[Pkg-utopia-maintainers] Bug#469990: avahi-daemon/avahi-dnsconfd: Problem with LSB header in init.d script

Petter Reinholdtsen petter.reinholdtsen at usit.uio.no
Sat Mar 8 14:33:21 UTC 2008


Package:  avahi-daemon avahi-dnsconfd
Version:  0.6.18-4
Severity: important
Tags:     patch
User:     initscripts-ng-devel at lists.alioth.debian.org
Usertags: incorrect-dependency

I just checked the shutdown order in unstable on a machine with
dependency based boot sequencing enabled, and discovered that the
avahi-daemon script was inserted into the wrong location for runlevels
0 and 6.  It should depend on $remote_fs, to make sure it is stopped
before sendsigs kills all processes, and to make sure /usr/ is mounted
before it try to use programs in /usr/bin/.  It also got a stop
symlink in rcS.d/, and this is wrong. While checking the source
package, I discovered that this also affects avahi-dnsconfd.

Here is a patch to solve it.

diff -ur avahi-0.6.22.orig/debian/avahi-daemon.init avahi-0.6.22/debian/avahi-daemon.init
--- avahi-0.6.22.orig/debian/avahi-daemon.init  2008-03-08 15:27:12.000000000 +0100
+++ avahi-0.6.22/debian/avahi-daemon.init       2008-03-08 15:28:25.000000000 +0100
@@ -1,12 +1,12 @@
 #!/bin/sh
 ### BEGIN INIT INFO
 # Provides:          avahi
-# Required-Start:    $local_fs dbus
-# Required-Stop:     $local_fs dbus
+# Required-Start:    $remote_fs dbus
+# Required-Stop:     $remote_fs dbus
 # Should-Start:             $syslog
 # Should-Stop:       $syslog
 # Default-Start:     2 3 4 5
-# Default-Stop:      S 0 1 6
+# Default-Stop:      0 1 6
 # Short-Description: Avahi mDNS/DNS-SD Daemon
 # Description:       Zeroconf daemon for configuring your network
 #                    automatically
Only in avahi-0.6.22/debian: avahi-daemon.init.~1~
diff -ur avahi-0.6.22.orig/debian/avahi-dnsconfd.init avahi-0.6.22/debian/avahi-dnsconfd.init
--- avahi-0.6.22.orig/debian/avahi-dnsconfd.init        2008-03-08 15:27:12.000000000 +0100
+++ avahi-0.6.22/debian/avahi-dnsconfd.init     2008-03-08 15:28:24.000000000 +0100
@@ -1,12 +1,12 @@
 #!/bin/sh
 ### BEGIN INIT INFO
 # Provides:          avahi-dnsconfd
-# Required-Start:    $local_fs avahi
-# Required-Stop:     $local_fs avahi
+# Required-Start:    $remote_fs avahi
+# Required-Stop:     $remote_fs avahi
 # Should-Start:             $syslog
 # Should-Stop:       $syslog
 # Default-Start:     2 3 4 5
-# Default-Stop:      S 0 1 6
+# Default-Stop:      0 1 6
 # Short-Description: Avahi Unicast DNS Configuration Daemon
 # Description:       A DNS configuration daemon using mDNS in a
 #                    DHCP-like fashion

As the stop script do not seem to do much except killing the daemon,
that task might be better left to the sendsigs script in runlevel 0
and 6, to speed up shutdown.  If this is indeed the case, I recommend
removing 0 and 6 from the Default-Stop list.

Happy hacking,
-- 
Petter Reinholdtsen





More information about the Pkg-utopia-maintainers mailing list