[Pkg-sympa-commits] [sympa] 12/28: Remove useless aliases from /etc/aliases (#615867)

Emmanuel Bouthenot kolter at moszumanska.debian.org
Wed Jun 11 21:53:03 UTC 2014


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

kolter pushed a commit to branch master
in repository sympa.

commit bf25a9210aac5da6ca61434c05f1d7883004f2bd
Author: Emmanuel Bouthenot <kolter at openics.org>
Date:   Fri May 16 00:09:23 2014 +0200

    Remove useless aliases from /etc/aliases (#615867)
---
 debian/sympa.postinst | 17 ++++-------------
 debian/sympa.postrm   |  5 -----
 2 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/debian/sympa.postinst b/debian/sympa.postinst
index d93d554..66e5e91 100644
--- a/debian/sympa.postinst
+++ b/debian/sympa.postinst
@@ -147,19 +147,10 @@ if [ -d /etc/sympa/config ]; then
 	rmdir /etc/sympa/config || true
 fi
 
-# Add the sympa aliases
-if ! grep -q "#-- SYMPA begin" /etc/aliases
-then
-	cat >>/etc/aliases <<EOF
-#-- SYMPA begin
-## Aliases used for the sympa mailing-list manager
-sympa:		"|/usr/lib/sympa/bin/queue sympa"
-sympa-request:	postmaster
-sympa-owner:	postmaster
-listmaster:	postmaster
-#-- SYMPA end
-EOF
-	newaliases
+# Remove old sympa aliases
+if [ -f /etc/aliases ]; then
+	sed -i -e '/#-- SYMPA begin/,/#-- SYMPA end/d' /etc/aliases
+	newaliases || true
 fi
 
 # Moving alias files to a destination where SYMPA can write
diff --git a/debian/sympa.postrm b/debian/sympa.postrm
index a55a60c..23605dd 100644
--- a/debian/sympa.postrm
+++ b/debian/sympa.postrm
@@ -48,11 +48,6 @@ if [ "$1" = "purge" ]; then
 		rm -r /var/lib/sympa/static_content
 	fi
 
-	if [ -f /etc/aliases ]; then
-		sed -i -e '/#-- SYMPA begin/,/#-- SYMPA end/d' /etc/aliases
-		newaliases || true
-	fi
-
 	rm -f /etc/sympa/cookie 2>/dev/null || true
 	rm -f /etc/sympa/cookies.history
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/sympa.git



More information about the Pkg-sympa-commits mailing list