Commit 272b7c5b authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-sh-functions: replace UID with EFFUID (checkbashims are happy with it)

parent b107ec8d
......@@ -83,7 +83,7 @@ showcmd()
if [ -z "$quiet" ] ; then
set_boldcolor $GREEN
local PROMTSIG="\$"
[ "$UID" = 0 ] && PROMTSIG="#"
[ "$EFFUID" = 0 ] && PROMTSIG="#"
echo " $PROMTSIG $@"
restore_color
fi >&2
......@@ -207,11 +207,10 @@ set_sudo()
# skip SUDO if disabled
[ -n "$EPMNOSUDO" ] && return
# set SUDO not for root user
[ -n "$UID" ] || UID=`id -u`
EFFUID=`id -u`
# do not need sudo
[ $UID = "0" ] && return
[ $EFFUID = "0" ] && return
# use sudo if possible
which sudo >/dev/null 2>/dev/null && SUDO="sudo" && return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment