abuild: use id instead of whoami
Furthermore compare the UID instead of the username.
This commit is contained in:
parent
d5013a3915
commit
eb0ffe7a8a
@ -2148,7 +2148,7 @@ done
|
|||||||
shift $(( $OPTIND - 1 ))
|
shift $(( $OPTIND - 1 ))
|
||||||
|
|
||||||
# check so we are not root
|
# check so we are not root
|
||||||
if [ "$(whoami)" = "root" ] && [ -z "$FAKEROOTKEY" ]; then
|
if [ $(id -u) -eq 0 ] && [ -z "$FAKEROOTKEY" ]; then
|
||||||
[ -z "$forceroot" ] && die "Do not run abuild as root"
|
[ -z "$forceroot" ] && die "Do not run abuild as root"
|
||||||
FAKEROOT=
|
FAKEROOT=
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user