Bug#975591: insserv/update-rc.d coordination missing (was Re: Canonical method to locally disable an init script?)

Thorsten Glaser t.glaser at tarent.de
Sun Dec 13 06:17:15 GMT 2020


On Wed, 25 Nov 2020, Bob Proulx wrote:

> Thorsten Glaser wrote:

> > So using disable is correct, defaults-disabled and remove isn't,

Right, I now figured out it isn’t.

>     root at angst:/etc# find /etc/rc?.d/ -name '*bind9'
>     /etc/rc0.d/K04bind9
>     /etc/rc1.d/K04bind9
>     /etc/rc2.d/K04bind9
>     /etc/rc3.d/K04bind9
>     /etc/rc4.d/K04bind9
>     /etc/rc5.d/K04bind9
>     /etc/rc6.d/K04bind9
> 
>     root at angst:/etc# apt-get install --reinstall bind9
[…]
> It warned that they were different from the LSB headers in the init
> script.  Because they were different.  And that could be any of the
> possible differences.  But it did not reset them.
> 
>     root at angst:/etc# find /etc/rc?.d -name '*bind9'
>     /etc/rc0.d/K04bind9
>     /etc/rc1.d/K04bind9
>     /etc/rc2.d/K04bind9
>     /etc/rc3.d/K04bind9
>     /etc/rc4.d/K04bind9
>     /etc/rc5.d/K04bind9
>     /etc/rc6.d/K04bind9

Right. I can verify that.

>     root at angst:/etc# find /etc/rc?.d -name '*bind9' -delete
>     root at angst:/etc# find /etc/rc?.d -name '*bind9'
> 
> All removed.  The re-install will reset the links to the defaults.
> 
>     root at angst:/etc# apt-get install --reinstall bind9
[…]
>     root at angst:/etc# find /etc/rc?.d -name '*bind9'
>     /etc/rc0.d/K04bind9
>     /etc/rc1.d/K04bind9
>     /etc/rc2.d/S03bind9
>     /etc/rc3.d/S03bind9
>     /etc/rc4.d/S03bind9
>     /etc/rc5.d/S03bind9
>     /etc/rc6.d/K04bind9

Yes, and that MUST NOT happen.

> Removing the S* links instead of disabling them with a K* link.  But
> leaving the K* links so it is an installed configuration.  Then

If the local administrator actively disables an init script, e.g. by
update-rc.d remove, it MUST NOT be re-added later. (This MIGHT require
insserv and update-rc.d to coordinate on “manually removed” state, but
this state MUST NOT be the presence of ANY symlinks for that script.)

Rationale:

Disabling an init script is *not* the same as leaving a K link…
because a K link will attempt to stop the service if manually started.
This MUST NOT happen.

Considering raising severity on this as disabling with update-rc.d remove
does not work and disabling with update-rc.d disable wrongly leaves any K
links around which causes unrelated software, that is, a manually started
service, to be broken, that is, stopped.

I just had this happen, so it isn’t an academic mind exercise.

bye,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg

*************************************************

Mit unserem Consulting bieten wir Unternehmen maßgeschneiderte Angebote in
Form von Beratung, Trainings sowie Workshops in den Bereichen
Softwaretechnologie, IT Strategie und Architektur, Innovation und Umsetzung
sowie Agile Organisation.

Besuchen Sie uns auf https://www.tarent.de/consulting .
Wir freuen uns auf Ihren Kontakt.

*************************************************



More information about the Debian-init-diversity mailing list