aboutsummaryrefslogtreecommitdiff
path: root/x60flashfrom5
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2014-11-24 18:22:02 +0000
committerFrancis Rowe <info@gluglug.org.uk>2014-11-24 18:22:02 +0000
commit06421bb21d0f44c6aa9525886461942b3b4413d0 (patch)
tree3ade5531bad37e3821a0c3be9d77d2e251ff691e /x60flashfrom5
parent4b662cf46572a360d027b5dbef1adb7409e341e9 (diff)
downloadlibrebootfr-06421bb21d0f44c6aa9525886461942b3b4413d0.tar.gz
librebootfr-06421bb21d0f44c6aa9525886461942b3b4413d0.zip
x60flashfrom5: check if user is root
Diffstat (limited to 'x60flashfrom5')
-rwxr-xr-xx60flashfrom55
1 files changed, 5 insertions, 0 deletions
diff --git a/x60flashfrom5 b/x60flashfrom5
index 1f8e0ec5..52766153 100755
--- a/x60flashfrom5
+++ b/x60flashfrom5
@@ -22,6 +22,11 @@
# set -u -e -v
set -v
+if [[ $EUID -ne 0 ]]; then
+ echo "This script must be run as root"
+ exit 1
+fi
+
# USE ROOT OR SUDO WHEN EXECUTING THIS
# uses flashrom to flash the rom