From: Don Armstrong Date: Thu, 26 Oct 2017 23:38:40 +0000 (-0700) Subject: use which instead of -x /path/to/cmd X-Git-Tag: debian/0.52-2~2 X-Git-Url: https://git.donarmstrong.com/unscd.git?a=commitdiff_plain;h=6ffeb1aa0f49937b08cd171631ba8dda630cb9e7;p=unscd.git use which instead of -x /path/to/cmd --- diff --git a/debian/unscd.postinst b/debian/unscd.postinst index 75d0cf4..27b83e2 100644 --- a/debian/unscd.postinst +++ b/debian/unscd.postinst @@ -5,7 +5,10 @@ set -e case "$1" in configure) # Create the unscd user - if [ -x /usr/sbin/adduser ] && [ -x /usr/bin/getent ] && [ -x /usr/sbin/addgroup ]; then + if which adduser >/dev/null 2>&1 && + which getent >/dev/null 2>&1 && + which id >/dev/null 2>&1 && + which addgroup >/dev/null 2>&1; then if ! getent group unscd >/dev/null 2>&1; then addgroup --system unscd; fi;