Package: zephyr-clients
Version: 2.1.20010518.SNAPSHOT-17.1
Severity: normal
Tags: patch

The zephyr-clients postinst script runs /etc/init.d/zhm restart, rather than /etc/init.d/zhm start; but the zhm init script only checks for whether zhm_args is empty (to avoid hanging) when it receives the "start" argument, not the "restart" argument. This causes the postinst script to hang when you install zephyr-clients and do not answer the debconf query.

I've attached a patch which fixes /etc/init.d/zhm so that it does the check on restart as well.

        -Tim Abbott
diff -ur zephyr-2.1.20010518.SNAPSHOT.orig/debian/zephyr-clients.init 
zephyr-2.1.20010518.SNAPSHOT/debian/zephyr-clients.init
--- zephyr-2.1.20010518.SNAPSHOT.orig/debian/zephyr-clients.init        
2007-07-18 03:00:21.000000000 -0400
+++ zephyr-2.1.20010518.SNAPSHOT/debian/zephyr-clients.init     2007-07-18 
03:02:58.000000000 -0400
@@ -25,9 +25,7 @@
        . /etc/default/zephyr-clients
 fi
 
-case "$1" in
-  start)
-       # note that the following will need revisting when we get hesiod support
+check_zhm_args() {
        if test -z "$zhm_args"
        then
                cat <<EOF
@@ -38,6 +36,12 @@
 EOF
                exit 0
        fi
+}
+
+case "$1" in
+  start)
+       # note that the following will need revisting when we get hesiod support
+       check_zhm_args
        echo -n "Starting $DESC: "
        start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
                --exec $DAEMON -- $zhm_args
@@ -59,6 +63,7 @@
        start-stop-daemon --oknodo --stop --quiet --pidfile \
                /var/run/$NAME.pid --exec $DAEMON
        sleep 1
+       check_zhm_args
        start-stop-daemon --start --quiet --pidfile \
                /var/run/$NAME.pid --exec $DAEMON -- -N $zhm_args
        echo "$NAME."

Reply via email to