[Pkg-mailman-hackers] Pkg-mailman commit - rev 55 - trunk/debian
Laszlo Boszormenyi
gcs-guest@haydn.debian.org
Mon, 12 Apr 2004 16:19:54 -0600
Author: gcs-guest
Date: 2004-04-12 16:19:51 -0600 (Mon, 12 Apr 2004)
New Revision: 55
Modified:
trunk/debian/mm_cfg.py
trunk/debian/postinst
Log:
Make the DEFAULT_SERVER_LANGUAGE code more robust, and add it to mm_cfg.py
if missing.
Modified: trunk/debian/mm_cfg.py
===================================================================
--- trunk/debian/mm_cfg.py 2004-04-12 20:46:57 UTC (rev 54)
+++ trunk/debian/mm_cfg.py 2004-04-12 22:19:51 UTC (rev 55)
@@ -72,7 +72,7 @@
#-------------------------------------------------------------
# The default language for this server.
-DEFAULT_SERVER_LANGUAGE='en'
+DEFAULT_SERVER_LANGUAGE = 'en'
#-------------------------------------------------------------
# Iirc this was used in pre 2.1, leave it for now
Modified: trunk/debian/postinst
===================================================================
--- trunk/debian/postinst 2004-04-12 20:46:57 UTC (rev 54)
+++ trunk/debian/postinst 2004-04-12 22:19:51 UTC (rev 55)
@@ -120,12 +120,6 @@
done
echo " done." >&2
done
- db_get mailman/default_server_language || true
- if [ ${RET} ]; then
- default_server_language=${RET}
- sed -e s/DEFAULT_SERVER_LANGUAGE=\'..\'/DEFAULT_SERVER_LANGUAGE=\'${default_server_language}\'/ ${mm_etc}/mm_cfg.py > ${mm_etc}/mm_cfg.py.$$
- mv -f ${mm_etc}/mm_cfg.py.$$ ${mm_etc}/mm_cfg.py
- fi
# Done with site language stuff
# Don't forget the qmail specific stuff (but why support non-free?)
@@ -255,6 +249,15 @@
# Uncruftify. I was on something bad.
rm -f /etc/cron.d/mm_cfg.py
+ if ! grep -q DEFAULT_SERVER_LANGUAGE /etc/mailman/mm_cfg.py; then
+ echo "DEFAULT_SERVER_LANGUAGE = 'en'" >> /etc/mailman/mm_cfg.py
+ fi
+ db_get mailman/default_server_language || true
+ if [ ${RET} ]; then
+ default_server_language=${RET}
+ sed -e s/DEFAULT_SERVER_LANGUAGE.*=.*\'..\'/DEFAULT_SERVER_LANGUAGE\ =\ \'${default_server_language}\'/ ${mm_etc}/mm_cfg.py > ${mm_etc}/mm_cfg.py.$$
+ mv -f ${mm_etc}/mm_cfg.py.$$ ${mm_etc}/mm_cfg.py
+ fi
fi
fi