d/postfwd.postrm: detect existens of command by which and not 'test -x'
This commit is contained in:
parent
ac0ac42ae2
commit
e438455e0f
11
debian/postfwd.postrm
vendored
11
debian/postfwd.postrm
vendored
|
@ -27,14 +27,17 @@ case "$1" in
|
|||
if USERID=`getent passwd $NUSER | cut -f 3 -d ':'`; then
|
||||
if [ -n "$USERID" ]; then
|
||||
if [ "$FIST_SYSTEM_UID" -le "$USERID" ] && \
|
||||
[ "$USERID" -le "$LAST_SYSTEM_UID" ] && \
|
||||
[ -x /usr/sbin/deluser ]; then
|
||||
[ "$USERID" -le "$LAST_SYSTEM_UID" ]; then
|
||||
if which deluser > /dev/null; then
|
||||
deluser --quiet $NUSER || true
|
||||
# And then remove the group
|
||||
GROUPID=`getent group $NGROUP | cut -f 3 -d ':'`
|
||||
if [ -n "$GROUPID" ] && [ -x /usr/sbin/delgroup ] ; then
|
||||
delgroup --quiet $NGROUP || true
|
||||
if [ -n "$GROUPID" ]; then
|
||||
if which delgroup > /dev/null; then
|
||||
delgroup --quiet $NGROUP || true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue