From 1f87c3cfc63d443b530b6cbad51993374b86b49f Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Aug 11 2016 12:10:47 +0000 Subject: fix check for root permissions --- diff --git a/arm-image-installer b/arm-image-installer index 9e0a024..b9cc2c6 100755 --- a/arm-image-installer +++ b/arm-image-installer @@ -157,7 +157,7 @@ if [ ! -z "$LISTTARGETS" ]; then fi # ensure sudo user -if [ "$(sudo whoami)" != "root" ] ; then +if [ "$(whoami)" != "root" ] ; then echo "Error: This script requires 'sudo' privileges in order to write to disk & mount media." exit 1 fi diff --git a/create-install-media b/create-install-media index 2a9e8ee..714796f 100755 --- a/create-install-media +++ b/create-install-media @@ -48,8 +48,8 @@ while [ $# -gt 0 ]; do shift done -# ensure user -if [ "$(sudo whoami)" != "root" ] ; then +# ensure sudo user +if [ "$(whoami)" != "root" ] ; then echo "Error: This script requires 'sudo' privileges in order to write to disk & mount media." exit 1 fi