From 06421bb21d0f44c6aa9525886461942b3b4413d0 Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Mon, 24 Nov 2014 18:22:02 +0000 Subject: x60flashfrom5: check if user is root --- x60flashfrom5 | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'x60flashfrom5') diff --git a/x60flashfrom5 b/x60flashfrom5 index 1f8e0ec5..52766153 100755 --- a/x60flashfrom5 +++ b/x60flashfrom5 @@ -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 -- cgit v1.2.3-70-g09d2