What's the insserv way of disabling services

Kel Modderman kel at otaku42.de
Wed May 7 10:00:18 UTC 2008

Hi Michael,

On Thursday 17 April 2008 12:27:27 Michael Biebl wrote:
> Hi,
> I was wondering, how to correctly disable a service with insserv.
> In the old style way, one would *not* run
> update-rc.d $service remove, because that would recreate the symlink on 
> the next package upgrade, but instead rename the symlinks from S?? to K??
> insserv -r by default removes all symlinks, so a package upgrade will 
> recreate them.
> Renaming S?? to K?? on the other hand doesn't seem to make sense with 
> insserv, as the priorities are not fixed and maybe confuse insserv when 
> it calculates the stop priorities.
> Besides, manually renaming the symlinks from S to K is cumbersome.
> Imho insserv should have a option to disable a service completely.
> An idea would be to store this information in a state file 
> /etc/init.d/.depend.disabled.
> insserv -D --disable would disable the service and add it to the state file
> insserv -e --enable would enable the service and remove it from the 
> state file.
> If a service is disabled,
> insserv $service would be no-op.
> What do you think?

I agree with pere that an insserv specific way would probably be less useful
than a generic interface for enabling/disabling system services.

One thought i had would be a package specific for this purpose, following
the specification drafted by Henrique M Holschuh [0,1].

such a package could provide /usr/sbin/policy-rc.d which would be the interface
for fine grained administration of per service policies. I don't know of any
package that installs a /usr/sbin/policy-rc.d file other than the simple one
cdeboostrap provides for chroots (exit 101).

[0] http://people.debian.org/~hmh/invokerc.d-policyrc.d-specification.txt
[1] /usr/share/doc/sysv-rc/README.policy-rc.d.gz

Thanks, Kel.

More information about the initscripts-ng-devel mailing list