[postfwd] 04/96: conditional use of deluser and delgroup
Jan Wagner
waja at alioth.debian.org
Tue Nov 5 20:09:27 UTC 2013
This is an automated email from the git hooks/post-receive script.
waja pushed a commit to branch master
in repository postfwd.
commit 863763f6a091e5ae601ba716b2844e9438814dae
Author: Jan Wagner <waja at cyconet.org>
Date: Mon Apr 14 09:12:19 2008 +0000
conditional use of deluser and delgroup
---
debian/postrm | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/debian/postrm b/debian/postrm
index 3e7be22..5b95704 100644
--- a/debian/postrm
+++ b/debian/postrm
@@ -27,14 +27,14 @@ 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
-
- deluser --quiet $NUSER || true
- # And then remove the group
- GROUPID=`getent group $NGROUP | cut -f 3 -d ':'`
- if [ -n "$GROUPID" ] ; then
- delgroup --quiet $NGROUP || true
- fi
+ [ "$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" ] && [ -x /usr/sbin/delgroup ] ; then
+ delgroup --quiet $NGROUP || true
+ fi
fi
fi
fi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/postfwd.git
More information about the Pkg-perl-cvs-commits
mailing list