summaryrefslogtreecommitdiffstats
path: root/abuild.in
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2015-11-25 12:19:09 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2016-02-03 18:21:02 +0000
commiteb0ffe7a8ae67e75ea7806da90ef7fc6c4122ad5 (patch)
tree5a9f9e610cca315a23de1c2ceb7cae48d29fc801 /abuild.in
parentd5013a39151c39a2e59650215ed2f4bf3104eb54 (diff)
downloadabuild-eb0ffe7a8ae67e75ea7806da90ef7fc6c4122ad5.tar.bz2
abuild-eb0ffe7a8ae67e75ea7806da90ef7fc6c4122ad5.tar.xz
abuild: use id instead of whoami
Furthermore compare the UID instead of the username.
Diffstat (limited to 'abuild.in')
-rw-r--r--abuild.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/abuild.in b/abuild.in
index 1f330b1..937c8e8 100644
--- a/abuild.in
+++ b/abuild.in
@@ -2148,7 +2148,7 @@ done
shift $(( $OPTIND - 1 ))
# 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"
FAKEROOT=
fi