Disabling services

Petter Reinholdtsen pere at hungry.com
Tue Sep 22 14:36:15 UTC 2009


[Erich Schubert]
> The Debian way is (AFAICT) using "update-rc.d disable".

Not yet.  The official Debian way is

  for f in /etc/rc?.d/S[0-9][0-9]scriptname ; do
    mv $f $(dirname $f)/K$(basename $f | cut -c2-)
  done

to disable a service.  The 'update-rc.d scriptname disable'
alternative is an unofficial alternative only available with recent
sysv-rc versions.

> Still there is a sensible non-empty value for "Default-Start" and I
> don't think that having the package installation script "disable"
> the service is the proper way.

Why not?

> So what do you suggest for installing packages that have a service
> - runnable as system service
> - not to be run as system service by default
> ?

I would recommend  to ship the package with

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

and use either a mv command like the one above or 'update-rc.d
scriptname enable 2 3 4 5' when the enable semantic is ready and
implemented in all the *-rc packages in Debian.

And, yes, I am aware that the current official API provided by
update-rc.d is not very good. :/

Happy hacking,
-- 
Petter Reinholdtsen




More information about the initscripts-ng-devel mailing list