From: Michael Tremer Date: Thu, 4 Jul 2024 18:23:14 +0000 (+0000) Subject: make.sh: Refactor the root user check X-Git-Tag: v2.29-core188~10^2~369 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b0c45169f257c0f5114d75fc608ee728431a3702;p=ipfire-2.x.git make.sh: Refactor the root user check Signed-off-by: Michael Tremer --- diff --git a/make.sh b/make.sh index 41476ce3b5..7f3333a214 100755 --- a/make.sh +++ b/make.sh @@ -381,8 +381,8 @@ prepareenv() { trap "exiterror 'Build process interrupted'" SIGINT SIGTERM SIGQUIT # Checking if running as root user - if [ $(id -u) -ne 0 ]; then - exiterror "root privileges required for building" + if [ "${UID}" -ne 0 ]; then + exiterror "root privileges required for building" fi local free_space free_blocks block_size