aboutsummaryrefslogtreecommitdiff
path: root/macbook21_firstflash
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2014-11-24 18:21:38 +0000
committerFrancis Rowe <info@gluglug.org.uk>2014-11-24 18:21:38 +0000
commit4b662cf46572a360d027b5dbef1adb7409e341e9 (patch)
tree31e582b9ab154428b402f528c9e299b7829c2f93 /macbook21_firstflash
parentce8306ffeb9cb69d5bef70ce1edfe02a4cfa7fc7 (diff)
downloadlibrebootfr-4b662cf46572a360d027b5dbef1adb7409e341e9.tar.gz
librebootfr-4b662cf46572a360d027b5dbef1adb7409e341e9.zip
macbook21_firstflash: check if user is root
Diffstat (limited to 'macbook21_firstflash')
-rwxr-xr-xmacbook21_firstflash5
1 files changed, 5 insertions, 0 deletions
diff --git a/macbook21_firstflash b/macbook21_firstflash
index c414f260..0a471f95 100755
--- a/macbook21_firstflash
+++ b/macbook21_firstflash
@@ -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