[Pkg-sympa-commits] [sympa] 04/07: Fixes in debian/config with a fresh install with very low debconf priority

Emmanuel Bouthenot kolter at moszumanska.debian.org
Fri Nov 25 19:29:48 UTC 2016


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

kolter pushed a commit to branch master
in repository sympa.

commit 8ef33053d4914dcab967dba87c0637299f2f8f83
Author: Emmanuel Bouthenot <kolter at openics.org>
Date:   Fri Nov 25 11:30:54 2016 +0100

    Fixes in debian/config with a fresh install with very low debconf priority
---
 debian/config | 33 ++++++++++++++++++++-------------
 1 file changed, 20 insertions(+), 13 deletions(-)

diff --git a/debian/config b/debian/config
index 5f9dba8..6e8101c 100644
--- a/debian/config
+++ b/debian/config
@@ -20,18 +20,13 @@ else
     conf=/etc/sympa/sympa.conf
 fi
 
-# Language selection
-# - currently supported languages
+# Default values
 default_lang="en"
-possible_langs="ar bg br ca cs de el en en_US es et eu fi fr gl hu id it ja ko la ml nb_NO nl oc pl pt_BR pt ro ru sv tr vi zh_CN zh_TW"
-supported_langs="${default_lang}"
-locales="$(locale -a)"
+domain="$(head -n 1 /etc/mailname || hostname -fqdn || echo localhost)"
+listmaster="listmaster@${domain}"
+wwsympa_url="http://${domain}/wws"
+use_fast_cgi="true"
 
-for lang in ${possible_langs} ; do
-    if echo "${locales}" | grep -q "^${lang}" ; then
-        supported_langs="${supported_langs}, ${lang}"
-    fi
-done
 
 # Get current config settings
 if [ -e "${conf}" ]; then
@@ -49,9 +44,23 @@ if [ -e "${conf}" ]; then
         *)
             ;;
     esac
+else
+    db_set sympa/language "${default_lang}"
+    db_set sympa/hostname "${domain}"
+    db_set sympa/listmaster "${listmaster}"
+    db_set wwsympa/wwsympa_url "${wwsympa_url}"
+    db_set wwsympa/fastcgi "${use_fast_cgi}"
 fi
 
 # Ask for language
+locales="$(locale -a)"
+possible_langs="ar bg br ca cs de el en en_US es et eu fi fr gl hu id it ja ko la ml nb_NO nl oc pl pt_BR pt ro ru sv tr vi zh_CN zh_TW"
+supported_langs="${default_lang}"
+for lang in ${possible_langs} ; do
+    if echo "${locales}" | grep -q "^${lang}" ; then
+        supported_langs="${supported_langs}, ${lang}"
+    fi
+done
 if [ "${supported_langs}" != "en" ]; then
     db_subst sympa/language supported_langs ${supported_langs}
     db_input medium sympa/language || [ $? -eq 30 ]
@@ -63,7 +72,6 @@ fi
 # Ask for hostname / domain
 db_get sympa/hostname
 if [ -z "${RET}" ]; then
-    domain=$(head -n 1 /etc/mailname || hostname -fqdn || echo localhost)
     db_set sympa/hostname "${domain}"
 fi
 db_input medium sympa/hostname || [ $? -eq 30 ]
@@ -107,7 +115,7 @@ db_go
 # Fastcgi usage
 db_get wwsympa/fastcgi
 if [ -z "${RET}" ] ; then
-    db_set wwsympa/fastcgi "true"
+    db_set wwsympa/fastcgi "${use_fast_cgi}"
 fi
 
 # Ask for the installed web server
@@ -115,7 +123,6 @@ db_input high wwsympa/webserver_type || [ $? -eq 30 ]
 db_go
 db_get wwsympa/webserver_type
 webserver="${RET}"
-
 if [ "${webserver}" != "none" ]; then
     # Ask for fastcgi usage
     db_input low wwsympa/fastcgi || [ $? -eq 30 ]

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