From 4b662cf46572a360d027b5dbef1adb7409e341e9 Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Mon, 24 Nov 2014 13:21:38 -0500 Subject: macbook21_firstflash: check if user is root --- diff --git a/macbook21_firstflash b/macbook21_firstflash index c414f26..0a471f9 100755 --- a/macbook21_firstflash +++ b/macbook21_firstflash @@ -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 v0.9.1