summaryrefslogtreecommitdiff
path: root/scripts/install
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2014-07-29 23:39:24 +0200
committerDaniil Baturin <daniil@baturin.org>2014-07-29 23:39:24 +0200
commit69a747c4c9203738ff0e621ab2066aa5d2a13709 (patch)
treeb8f211dabafbefb8ccaea194f21f952491484e65 /scripts/install
parent127b7a12dbfabfe33b8d3733648c1bec1fa5d323 (diff)
downloadvyatta-cfg-system-69a747c4c9203738ff0e621ab2066aa5d2a13709.tar.gz
vyatta-cfg-system-69a747c4c9203738ff0e621ab2066aa5d2a13709.zip
Replace login name check with effective UID check in install-image.
Diffstat (limited to 'scripts/install')
-rwxr-xr-xscripts/install/install-image4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/install/install-image b/scripts/install/install-image
index f1f64dc2..c7323fbf 100755
--- a/scripts/install/install-image
+++ b/scripts/install/install-image
@@ -242,8 +242,8 @@ else
PASSWORD=""
fi
-if [ `whoami` != 'root' ] ; then
- fail_exit 'This script must be run with root privileges.'
+if [ $(id -u) != 0 ]; then
+ fail_exit "Image installation requires root privileges!"
fi
trap sig_handler INT KILL