[Amavisd-new-commits] [pkg-amavisd-new] 01/01: Don't hardcode path to deluser/adduser

Brian May bam at debian.org
Fri Jul 14 02:15:57 UTC 2017


This is an automated email from the git hooks/post-receive script.

bam pushed a commit to branch master
in repository pkg-amavisd-new.

commit e9de90807cef8bdca74b44123d28b8d8ba9fe2d4
Author: Brian May <brian at linuxpenguins.xyz>
Date:   Fri Jul 14 12:09:54 2017 +1000

    Don't hardcode path to deluser/adduser
---
 debian/amavisd-new.postrm | 14 +++++++++-----
 debian/changelog          |  1 +
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/debian/amavisd-new.postrm b/debian/amavisd-new.postrm
index e8db911..d95ea28 100644
--- a/debian/amavisd-new.postrm
+++ b/debian/amavisd-new.postrm
@@ -34,15 +34,19 @@ case "$1" in
 	done
 
 	if getent passwd amavis >/dev/null; then
-		if [ -x /usr/sbin/deluser ]; then
-			deluser --system amavis
+		if [ -x "$(command -v deluser)" ]; then
+			deluser --quiet --system amavis > /dev/null || true
+		else
+			echo >&2 "not removing amavis system account because deluser command was not found"
 		fi
 	fi
 
         if getent group amavis >/dev/null; then
-                if [ -x /usr/sbin/delgroup ]; then
-                        delgroup --system amavis
-                fi
+		if [ -x "$(command -v delgroup)" ]; then
+			delgroup --quiet --system amavis > /dev/null || true
+		else
+			echo >&2 "not removing amavis system group because delgroup command was not found"
+		fi
         fi
 	
 	echo "Removing amavis files and directories..."
diff --git a/debian/changelog b/debian/changelog
index 47fdb7f..9598393 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ amavisd-new (1:2.11.0-1) UNRELEASED; urgency=medium
   * New upstream version.
   * Update standards version to 4.0.0.
   * Add required depends on lsb-base (>= 3.0-6).
+  * Don't hardcode path to deluser/delgroup in postrm.
 
  -- Brian May <bam at debian.org>  Fri, 14 Jul 2017 10:20:42 +1000
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/amavisd-new/pkg-amavisd-new.git



More information about the Amavisd-new-commits mailing list