Package: wide-dhcpv6-client Version: 20080615-11.1 Severity: normal Tags: patch ipv6
The init script 'stop' function doesn't wait for the old process to exit, but just sends SIGTERM and walks away... This means that 'restart' fails if the old process doesn't exit quickly enough. The attached patch alters the start-stop-daemon invocation to make it wait until the old daemon has really exited (and eventually forceably kill it if it doesn't). I've set the timeout to 20 seconds before SIGKILL is sent so this might need to be reviewed and adjusted upwards if it's considered too short... Cheers, Tim. -- System Information: Debian Release: 7.4 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages wide-dhcpv6-client depends on: ii debconf [debconf-2.0] 1.5.49 ii libc6 2.13-38+deb7u1 ii lsb-base 4.1+Debian8+deb7u1 ii sharutils 1:4.11.1-1 wide-dhcpv6-client recommends no packages. wide-dhcpv6-client suggests no packages. -- Configuration Files: -- debconf information: * wide-dhcpv6-client/interfaces: ppp0
--- ./wide-dhcpv6-client.orig 2014-04-22 20:35:56.848604982 +0100 +++ /etc/init.d/wide-dhcpv6-client 2014-04-22 20:29:28.577424888 +0100 @@ -17,6 +17,8 @@ NAME="dhcp6c" DESC="WIDE DHCPv6 client" +STOP_RETRY_SCHEDULE='TERM/20/forever/KILL/1' + . /lib/lsb/init-functions test -x $DHCP6CBIN || exit 0 @@ -61,7 +63,7 @@ ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" - start-stop-daemon --stop --quiet --pidfile $DHCP6CPID --oknodo + start-stop-daemon --stop --quiet --retry $STOP_RETRY_SCHEDULE --pidfile $DHCP6CPID --oknodo log_end_msg $? rm -f $DHCP6CPID ;;