From: Wilfried Göesgens Date: Wed, 7 Feb 2007 23:23:56 +0000 (+0000) Subject: * ignore question not asked returns X-Git-Tag: v7.86~3591 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=377eb7e34e4adb55e7229f6d926875bd006819d4 * ignore question not asked returns * ignore fails on removing database entries --- diff --git a/webcit/debian/changelog b/webcit/debian/changelog index 0f870279f..ae5a30084 100644 --- a/webcit/debian/changelog +++ b/webcit/debian/changelog @@ -1,3 +1,8 @@ +webcit (7.02-7) unstable; urgency=low + + * better way of asking questions. + + -- Wilfried Goesgens Wed, 7 Feb 2007 21:09:00 +0100 webcit (7.02-6) unstable; urgency=low * calculate static directories acurate diff --git a/webcit/debian/citadel-webcit.config b/webcit/debian/citadel-webcit.config index 534572add..a6f232381 100755 --- a/webcit/debian/citadel-webcit.config +++ b/webcit/debian/citadel-webcit.config @@ -2,67 +2,64 @@ set -e . /usr/share/debconf/confmodule -CONFIGURE=no - -if test -e /etc/default/webcit; then - source /etc/default/webcit -else - CONFIGURE=yes - export WEBCIT_CITADEL_IP=127.0.0.1 - export WEBCIT_CITADEL_PORT=504 -fi +db_version 2.0 db_capb backup - -# are we unconfigured? -db_get ciatdel/WebcitWebserver &&WWWTYPE="$RET" -if test -z "$WWWTYPE"; then - CONFIGURE=yes -fi; +DO_CONFIGURE=no if test -n "$2"; then # do we want to reconfigure? if test "`echo $2 | sed -e 's/[.-]//g'`" -lt 127 \ - -o $1 = reconfigure + -o "$1" = reconfigure then - CONFIGURE=yes + DO_CONFIGURE=yes fi else # are we in first install? if test "$1" = "configure"; then - CONFIGURE=yes + DO_CONFIGURE=yes fi fi -if test "$CONFIGURE" = "yes"; then +if test "$DO_CONFIGURE" = "yes"; then + if test -e /etc/default/webcit; then + source /etc/default/webcit + else + export WEBCIT_CITADEL_IP=127.0.0.1 + export WEBCIT_CITADEL_PORT=504 + fi STATE=1 - LASTSTATE=2 + LASTSTATE=4 while [ "$STATE" != 0 -a "$STATE" -le "$LASTSTATE" ]; do + case "$STATE" in 1) - db_input high citadel/WebcitApacheIntegration + echo aou $STATE>>/tmp/bla + db_input high citadel/WebcitApacheIntegration || true + db_go + echo aou $STATE>>/tmp/bla ;; 2) db_get citadel/WebcitApacheIntegration if test "$RET" = "Internal"; then - db_input high citadel/WebcitHttpPort + db_input high citadel/WebcitHttpPort || true else - db_set citadel/WebcitHttpPort 8504 + db_set citadel/WebcitHttpPort 8504 || true fi ;; 3) - db_get citadel/WebcitApacheIntegration + db_get citadel/WebcitApacheIntegration || true if test "$RET" = "Internal"; then - db_input high citadel/WebcitHttpsPort - db_set citadel/WebcitBindIp 0.0.0.0 + db_input high citadel/WebcitHttpsPort || true + export WEBCIT_LISTEN_IP=0.0.0.0 else db_set citadel/WebcitHttpsPort -1 - db_set citadel/WebcitBindIp 127.0.0.1 + export WEBCIT_LISTEN_IP= 127.0.0.1 fi ;; 4) - db_input high citadel/WebcitInstallnote + db_input high citadel/WebcitInstallnote||true ;; esac if db_go; then diff --git a/webcit/debian/citadel-webcit.postrm b/webcit/debian/citadel-webcit.postrm index 4c7930f2f..567ad31c8 100644 --- a/webcit/debian/citadel-webcit.postrm +++ b/webcit/debian/citadel-webcit.postrm @@ -6,9 +6,10 @@ set -e case "$1" in purge) echo "/etc/citadel/www/keys not removed. " - db_purge 'citadel/WebcitHttpsPort' - db_purge 'citadel/WebcitHttpPort' - db_purge 'citadel/WebcitInstallnote' + rm -f /etc/default/webcit + db_purge 'citadel/WebcitHttpsPort' || true + db_purge 'citadel/WebcitHttpPort' || true + db_purge 'citadel/WebcitApacheIntegration' ||true ;; disappear) if test "$2" != overwriter; then