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