aboutsummaryrefslogtreecommitdiff
path: root/flash
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2014-11-24 18:16:36 +0000
committerFrancis Rowe <info@gluglug.org.uk>2014-11-24 18:16:36 +0000
commit7b1b072d9aef3da652eca8d9fb038740c3c8fd53 (patch)
treec62cad400d2a00618fb441882fde883527b6fb28 /flash
parent1ae732e2a7f4f214c772f27a292a3a7270cb3f4f (diff)
downloadlibrebootfr-7b1b072d9aef3da652eca8d9fb038740c3c8fd53.tar.gz
librebootfr-7b1b072d9aef3da652eca8d9fb038740c3c8fd53.zip
flash: check if user is root
Diffstat (limited to 'flash')
-rwxr-xr-xflash5
1 files changed, 5 insertions, 0 deletions
diff --git a/flash b/flash
index 91d4b879..fdc13d61 100755
--- a/flash
+++ b/flash
@@ -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