From 69a747c4c9203738ff0e621ab2066aa5d2a13709 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Tue, 29 Jul 2014 23:39:24 +0200 Subject: Replace login name check with effective UID check in install-image. --- scripts/install/install-image | 4 ++-- 1 file 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 -- cgit v1.2.3