Remove avahi-daemon from runlevels 0-6

Bug #128184 reported by Colin Watson
6
Affects Status Importance Assigned to Milestone
avahi (Ubuntu)
Triaged
Low
Unassigned

Bug Description

avahi-daemon is currently stopped in runlevels 0 and 6. Is this necessary? It doesn't seem to do anything much of note on SIGTERM; as far as I can see it doesn't need to write out any persistent state to disk or anything like that. We established a while back in Ubuntu that only services which need careful shutdown procedures need to have their init scripts run in runlevels 0 or 6, while everything else should be handled by the SIGTERM/wait-five-seconds/SIGKILL procedure in /etc/init.d/sendsigs.

If my assessment is accurate, then please adjust avahi-daemon's update-rc.d invocation to remove it from runlevels 0 and 6. Note that you'll need explicit migration code in the postinst to remove the old rc[06].d symlinks on upgrade, e.g.:

# Remove shutdown and reboot links; this init script does not need them.
if dpkg --compare-versions "$2" lt WHATEVER_THE_RELEVANT_VERSION_IS; then
        rm -f /etc/rc0.d/K16avahi-daemon /etc/rc6.d/K16avahi-daemon
fi

Revision history for this message
Colin Watson (cjwatson) wrote :

(While I agree that this is a minor point, fixing this consistently across the board makes a difference to shutdown speed. See https://wiki.ubuntu.com/Teardown.)

Revision history for this message
Daniel T Chen (crimsun) wrote :

If this issue remains relevant for 8.10 and newer, it's certainly still present in the postinst:

...
update-rc.d avahi-daemon start 14 2 3 4 5 . stop 86 0 1 6 . >/dev/null
...

Changed in avahi:
status: New → Confirmed
summary: - unnecessarily stopped in runlevels 0/6?
+ Remove avahi-daemon from runlevels 0-6
Changed in avahi (Ubuntu):
importance: Undecided → Low
status: Confirmed → Triaged
Revision history for this message
Jörg Frings-Fürst (jff-de) wrote :

Hi

in 13.10 the values are

# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6

Can this bug closed?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.