conditional use of deluser and delgroup
This commit is contained in:
parent
f31cd74f74
commit
863763f6a0
6
debian/postrm
vendored
6
debian/postrm
vendored
|
@ -27,12 +27,12 @@ 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" ]; then
|
||||
|
||||
[ "$USERID" -le "$LAST_SYSTEM_UID" ] && \
|
||||
[ -x /usr/sbin/deluser ]; then
|
||||
deluser --quiet $NUSER || true
|
||||
# And then remove the group
|
||||
GROUPID=`getent group $NGROUP | cut -f 3 -d ':'`
|
||||
if [ -n "$GROUPID" ] ; then
|
||||
if [ -n "$GROUPID" ] && [ -x /usr/sbin/delgroup ] ; then
|
||||
delgroup --quiet $NGROUP || true
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue