aboutsummaryrefslogtreecommitdiff
path: root/lenovobios_secondflash
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2014-11-24 18:21:16 +0000
committerFrancis Rowe <info@gluglug.org.uk>2014-11-24 18:21:16 +0000
commitce8306ffeb9cb69d5bef70ce1edfe02a4cfa7fc7 (patch)
tree8c7c4c3aebafb01d2ab80ed5083b795bd2c743c8 /lenovobios_secondflash
parent92a3bcb85ffa10d3216fe95a39857d299807b737 (diff)
downloadlibrebootfr-ce8306ffeb9cb69d5bef70ce1edfe02a4cfa7fc7.tar.gz
librebootfr-ce8306ffeb9cb69d5bef70ce1edfe02a4cfa7fc7.zip
lenovobios_secondflash: check if user is root
Diffstat (limited to 'lenovobios_secondflash')
-rwxr-xr-xlenovobios_secondflash5
1 files changed, 5 insertions, 0 deletions
diff --git a/lenovobios_secondflash b/lenovobios_secondflash
index c0a1cc81..9c5ec108 100755
--- a/lenovobios_secondflash
+++ b/lenovobios_secondflash
@@ -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
# for T60 or X60 owners with Lenovo BIOS