summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2014-11-24 13:16:36 (EST)
committer Francis Rowe <info@gluglug.org.uk>2014-11-24 13:16:36 (EST)
commit7b1b072d9aef3da652eca8d9fb038740c3c8fd53 (patch)
treec62cad400d2a00618fb441882fde883527b6fb28
parent1ae732e2a7f4f214c772f27a292a3a7270cb3f4f (diff)
downloadlibreboot-7b1b072d9aef3da652eca8d9fb038740c3c8fd53.zip
libreboot-7b1b072d9aef3da652eca8d9fb038740c3c8fd53.tar.gz
libreboot-7b1b072d9aef3da652eca8d9fb038740c3c8fd53.tar.bz2
flash: check if user is root
-rwxr-xr-xflash5
1 files changed, 5 insertions, 0 deletions
diff --git a/flash b/flash
index 91d4b87..fdc13d6 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