From 562b3a6f84d14430dfdce9e28489d72724f321aa Mon Sep 17 00:00:00 2001 From: janw Date: Thu, 18 Sep 2008 11:59:53 +0000 Subject: [PATCH] Added default configuration. Added debconf script. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12509 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/debian/gosa-si-server.config | 50 ++++++++++++++++++++++++++++ gosa-si/server.conf | 4 +++ 2 files changed, 54 insertions(+) create mode 100644 gosa-si/debian/gosa-si-server.config diff --git a/gosa-si/debian/gosa-si-server.config b/gosa-si/debian/gosa-si-server.config new file mode 100644 index 000000000..fd90facfa --- /dev/null +++ b/gosa-si/debian/gosa-si-server.config @@ -0,0 +1,50 @@ +#!/bin/sh +set -e +. /usr/share/debconf/confmodule +db_capb backup +db_title "GOsa-SI Database Setup" + +STATE=1 +while true; do + case "$STATE" in + 1) + db_input medium gosa-si/hostname || true + ;; + 2) + db_input medium gosa-si/database || true + ;; + 3) + db_input high gosa-si/username || true + ;; + 4) + db_input high gosa-si/password || true + ;; + 5) + db_input critical gosa-si/rootpw || true + ;; + *) + # The default case catches when $STATE is greater than the + # last implemented state, and breaks out of the loop. This + # requires that states be numbered consecutively from 1 + # with no gaps, as the default case will also be entered + # if there is a break in the numbering + break # exits the enclosing "while" loop ;; + esac + + if db_go; then + STATE=$(($STATE + 1)) + else + STATE=$(($STATE - 1)) + fi +done + +if [ $STATE -eq 1 ]; then + # The user has asked to back up from the first + # question. This case is problematical. Regular + # dpkg and apt package installation isn’t capable + # of backing up questions between packages as this + # is written, so this will exit leaving the package + # unconfigured - probably the best way to handle + # the situation. + exit 10 +fi diff --git a/gosa-si/server.conf b/gosa-si/server.conf index c4c0a3712..657230c6b 100644 --- a/gosa-si/server.conf +++ b/gosa-si/server.conf @@ -8,6 +8,10 @@ ldap-uri = ldap://127.0.0.1 ldap-base = dc=your,dc=domain ldap-admin-dn = cn=ldapadmin,dc=your,dc=domain ldap-admin-password = tester +mysql-host = 127.0.0.1 +mysql-username = gosa_si +mysql-password = gosa +mysql-database = gosa_si [ClientPackages] key = secret-server-password -- 2.30.2