From ce8306ffeb9cb69d5bef70ce1edfe02a4cfa7fc7 Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Mon, 24 Nov 2014 18:21:16 +0000 Subject: lenovobios_secondflash: check if user is root --- lenovobios_secondflash | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.2.3-70-g09d2