Bug#680293: update-rc.d manual: `update-rc.d remove name` works when `/etc/init.d/name` exists

Richard Laager rlaager at wiktel.com
Sun Jul 15 02:34:56 BST 2018


On Wed, 04 Jul 2012 23:00:53 +0200 Paul Menzel
<pm.debian at googlemail.com> wrote:
> Am Mittwoch, den 04.07.2012, 21:33 +0100 schrieb Roger Leigh:
> > On Wed, Jul 04, 2012 at 10:17:10PM +0200, Paul Menzel wrote:
> > > Does the manual need updating?
> > 
> > No, I think the manual is correct and update-rc.d is not behaving as
> > documented.
> 
> I wonder though, what is the disadvantage of leaving `/etc/init.d/name`
> behind and `-f` has to be used to do so?

The documented behavior is important if two packages provide a service
of the same name. For example, the packages "ntp" and "ntpsec" both
provide a service called "ntp". (I am the maintainer of ntpsec.) A user
hit this in bug #901439:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=901439

Consider this series of steps:
1) apt install ntp
2) apt install ntpsec
3) apt purge ntp

Step 1 creates /etc/init.d/ntp and the symlinks. Step 2 results in the
ntp package being removed, and ntpsec's /etc/init.d/ntp installed
instead. Step 3 results in ntp's postrm script, by way of the standard
dh_installinit snippet, calling `update-rc.d ntp remove`.

Expected results:
/etc/rc*.d/*ntp symlinks are left alone.

Actual results:
/etc/rc*.d/*ntp symlinks are deleted.


Purging ntp after installing ntpsec seems to be fairly common with
users. Accordingly, I'm raising the severity of this bug to important. I
would mark it serious, but I can't currently point to an explicit policy
item being violated nor am I the maintainer of this package (nor a
release manager).

The same thing happens, for the exact same reasons, if you start with
ntpsec, install ntp, then purge ntpsec.

-- 
Richard



More information about the Pkg-systemd-maintainers mailing list