add conditional deluser and delgroup

This commit is contained in:
Jan Wagner 2008-04-14 13:56:11 +00:00
parent 863763f6a0
commit e1a89b693e

10
debian/postrm vendored
View file

@ -30,11 +30,11 @@ case "$1" in
[ "$USERID" -le "$LAST_SYSTEM_UID" ] && \ [ "$USERID" -le "$LAST_SYSTEM_UID" ] && \
[ -x /usr/sbin/deluser ]; then [ -x /usr/sbin/deluser ]; then
deluser --quiet $NUSER || true deluser --quiet $NUSER || true
# And then remove the group # And then remove the group
GROUPID=`getent group $NGROUP | cut -f 3 -d ':'` GROUPID=`getent group $NGROUP | cut -f 3 -d ':'`
if [ -n "$GROUPID" ] && [ -x /usr/sbin/delgroup ] ; then if [ -n "$GROUPID" ] && [ -x /usr/sbin/delgroup ] ; then
delgroup --quiet $NGROUP || true delgroup --quiet $NGROUP || true
fi fi
fi fi
fi fi
fi fi