From: Alexander Barton Date: Wed, 26 Nov 2014 14:45:05 +0000 (+0100) Subject: Honor UID/EUID better X-Git-Url: https://arthur.barton.de/gitweb/?p=ConfigScripts.git;a=commitdiff_plain;h=5b8ed57f127e31900703df164d657603a2b3067e;hp=95014f6520ed0996214198d1a48ebc4687358121 Honor UID/EUID better --- diff --git a/install.sh b/install.sh index 7473e97..e3b0359 100755 --- a/install.sh +++ b/install.sh @@ -37,7 +37,7 @@ Copy_File() { } Config_System() { - if [ "$UID" = "0" -a -z "$I_local" ]; then + if [ "$EUID" = "0" -a -z "$I_local" ]; then Msg "Starting system configuration:\n" Msg " - bash shell:\n" if [ -e /etc/bash.bashrc ]; then @@ -114,10 +114,11 @@ while [ $# -gt 0 ]; do shift done -[ -n "$UID" ] || UID=`id -u` -export UID +[ -n "$UID" ] || UID=`id -r -u` +[ -n "$EUID" ] || EUID=`id -u` +export UID EUID -Msg "Running $NAME (uid=$UID) ...\n" +Msg "Running $NAME (uid=$UID; euid=$EUID) ...\n" user=`basename "$HOME"`