Comment 1 for bug 218586

Revision history for this message
bugmenot (bugmenot) wrote :

confirmed: ubuntu 7.10, ubuntu-desktop
confirmed: ubuntu 8.04, ubuntu-desktop and xubuntu-desktop
for a list of possibly affected services,
 grep -e "invoke-rc.d" /var/lib/dpkg/info/*postinst

Every upgrade or reinstall of an affected service triggers this bug, if the service was disabled with services-admin application.
The services' postinst maintainer script runs invoke-rc.d, which in turn starts the service if the service link in the current runlevel is missing (deleted by services-admin).

Reproduced this way:
# terminal
user@ubuntu:~$ runlevel
N 2
user@ubuntu:~$ ls /etc/rc2.d/*avahi-daemon
/etc/rc2.d/S18avahi-daemon
# menu System>Administration>Services: "disable" avahi-daemon
user@ubuntu:~$ ls /etc/rc2.d/*avahi-daemon
ls: /etc/rc2.d/*avahi-daemon: No such file or directory
user@ubuntu:~$ ps ax | grep avahi
 9666 pts/1 S+ 0:00 grep avahi
user@ubuntu:~$ sudo invoke-rc.d avahi-daemon start
[sudo] password for user:
 * Starting Avahi mDNS/DNS-SD Daemon avahi-daemon [ OK ]
user@ubuntu:~$ ps ax | grep avahi
 9699 ? Ss 0:00 avahi-daemon: registering [ubuntu.local]
 9700 ? Ss 0:00 avahi-daemon: chroot helper
 9707 pts/1 R+ 0:00 grep avahi

This bug only shows up with deleted links.
It is not restricted to avahi-daemon.
Reproduced with atd, avahi-daemon, cupsys, sysklogd (others not tested).

invoke-rc.d acts as expected (does not start the service) if the service was correctly disabled (link renamed to Knn...).
This can be done using an undocumented feature of services-admin:
Right-click on the service, in the advanced settings select "stop".
Do not select "ignore" here: the services' link will then be deleted and cause this bug to happen again on next upgrade or reinstall.

One of invoke-rc.d (package sysv-rc) and services-admin (package gnome-system-tools) is clearly misbehaving here. I vote for services-admin, because of its persistent habit of deleting and mixing up links - see bug #19034 for some historical evidence.