]> asedeno.scripts.mit.edu Git - 1ts-debian.git/commitdiff
only consult debconf if there is anything to be configured
authorkcr <kcr@cbed1d16-5ef5-0310-b6a1-d4a37b08ba1f>
Sat, 26 May 2001 02:35:45 +0000 (02:35 +0000)
committerkcr <kcr@cbed1d16-5ef5-0310-b6a1-d4a37b08ba1f>
Sat, 26 May 2001 02:35:45 +0000 (02:35 +0000)
git-svn-id: svn://svn.1ts.org/debian/trunk/zephyr@59 cbed1d16-5ef5-0310-b6a1-d4a37b08ba1f

debian/zephyr-clients.config
debian/zephyr-clients.postinst

index 26de8d36fd59cc3e2fe4f7c55310863fb0d5744d..16a003d016e06c7f71079bc5b15273cd2baa8666 100644 (file)
@@ -2,6 +2,13 @@
 
 . /usr/share/debconf/confmodule
 
-db_input high zephyr-clients/servers || true
-db_go
-
+zhm_args=""
+if test -f /etc/default/zephyr-clients
+then
+       . /etc/default/zephyr-client
+fi
+if test -z "$zhm_args"
+then
+       db_input high zephyr-clients/servers || true
+       db_go
+fi
index d2104e3f9e9e6f734056dfd02b841737d80ff291..8f71a29b8af790727349f94056fed2c6573302ae 100644 (file)
@@ -37,13 +37,21 @@ case "$1" in
                fi
        fi
 
-       db_get zephyr-clients/servers
+       zhm_args=""
        if test -f /etc/default/zephyr-clients
        then
-               grep -v ^zhm_args /etc/default/zephyr-clients > $tmpfile || true
+               . /etc/default/zephyr-clients
+       fi
+       if test -z "$zhm_args"
+       then
+               db_get zephyr-clients/servers
+               if test -f /etc/default/zephyr-clients
+               then
+                       grep -v ^zhm_args /etc/default/zephyr-clients > $tmpfile || true
+               fi
+               echo zhm_args=\"${RET}\" >> $tmpfile
+               cat $tmpfile > /etc/default/zephyr-clients
        fi
-       echo zhm_args=\"${RET}\" >> $tmpfile
-       cat $tmpfile > /etc/default/zephyr-clients
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)