add conditional deluser and delgroup
This commit is contained in:
parent
863763f6a0
commit
e1a89b693e
10
debian/postrm
vendored
10
debian/postrm
vendored
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue