[Pkg-sympa-commits] [sympa] 13/28: Update {ww, }sympa.conf in postinst: disable pidfiles options (now deprecated)

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 40f4dfe228c1c14a0b5a5d53bfe63a4c7a7d99e4
Author: Emmanuel Bouthenot <kolter at openics.org>
Date:   Fri May 16 00:17:47 2014 +0200

    Update {ww,}sympa.conf in postinst: disable pidfiles options (now deprecated)
---
 debian/sympa.postinst | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/debian/sympa.postinst b/debian/sympa.postinst
index 66e5e91..852cd45 100644
--- a/debian/sympa.postinst
+++ b/debian/sympa.postinst
@@ -70,22 +70,28 @@ if [ "$1" = "configure" ]; then
 fi
 
 # Install sympa.conf
+if [ ! -f "$conf" ]; then
+	# Create congfiguration file
+	/usr/lib/sympa/bin/sympa_wizard.pl --create sympa.conf --target "$conf"
+fi
 if [ -f "$conf" ]; then
 	# Replace/disable obsolete settings in configuration file
+	perl -i -pe 's%^#?(cookie\s+).*%cookie `cat /etc/sympa/cookie`%; s%^(syslog\s+).*%syslog `cat /etc/sympa/facility`%;' "$conf"
 	perl -i -pe 's%^\s*msgcat(.*)%localedir /usr/lib/sympa/locale%; s%(\s*queueexpire.*)%# $1%;' "$conf"
 	perl -i -pe 's%^\s*(dkim_header_list.*)$%#$1%;' "$conf"
-else
-	# Create congfiguration file
-	/usr/lib/sympa/bin/sympa_wizard.pl --create sympa.conf --target "$conf"
-	perl -i -pe 's%^#?(cookie\s+).*%cookie `cat /etc/sympa/cookie`%; s%^(syslog\s+).*%syslog `cat /etc/sympa/facility`%;' "$conf"
+	perl -i -pe 's/^(pidfile.*)$/### deprecated (>= 6.1.20): \1/' "$conf"
 fi
 
 # Install wwsympa.conf even if WWSympa is not used, we need to provide a
 # default wwsympa.conf
 if [ ! -f "$wwconf" ]; then
 	/usr/lib/sympa/bin/sympa_wizard.pl --create wwsympa.conf --target "$wwconf"
+fi
+if [ -f "$wwconf" ]; then
+	# Replace/disable obsolete settings in configuration file
 	perl -i -pe 's%^(arc_path\s+).*%$1/var/lib/sympa/wwsarchive%; s%^(bounce_path\s+).*%$1/var/spool/sympa/wwsbounce%' "$wwconf"
 	perl -i -pe 's%^(log_facility\s+).*%log_facility `cat /etc/sympa/facility`%;' "$wwconf"
+	perl -i -pe 's/^([_a-z]+_pidfile\s.*)$/### deprecated (>= 6.1.20): \1/' "$wwconf"
 fi
 
 # Configure the language

-- 
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