Disabling services

Erich Schubert erich.schubert at gmail.com
Tue Sep 22 12:48:05 UTC 2009

Hello everybody,
Sorry I didn't have time to follow all the discussions.

There is just one point I'd like to throw into the discussion that
should probably also be taken care of:
Disabling services.

Right now, many many services use a file in /etc/default/foobar that
is used for enabling/disabling startup of the service.
The handling of these files - an in particular the behaviour of the
init script when disabled - varies a LOT.
Some were printing a "failed" message when disabled (e.g. jackd),
others print a warning or just "Not starting MPD, disabled in
/etc/default/mpd". Or silently do nothing. I have filed bug reports
against a few where I noticed them printing a "failed" message, and
the service was disabled by default (and runnable in user mode, which
perfectly makes sense, too). So jackd for example should no longer

Still I'm not confident with this setup:
1. You cannot start the service manually via /etc/init.d/service start
2. You often cannot stop the service when it is still running after
disabling it in /etc/default

Other (new) options include the modification of Default-Start header
or adding an X-Disabled header to the init script.
I don't like this: init scripts change rather often, and we don't have
a merging facility in place that will sensibly merge this so far.

The Debian way is (AFAICT) using "update-rc.d disable". This should be
most extensible to different init systems and solve both 1 and 2
above. Still too many package use the /etc/default/foobar method (I
have to admit, even pyroman, my own software, follows this
pseudo-convention; the reason is that it need to be configured to work
and shouldn't be runnable accidentially via /etc/init.d/pyroman start
- but I have other plans for how to work around this).

However, using update-rc.d + "Default-Start" as we have it right now
isn't sufficient AFAICT.
Take pulseaudio for example. The default setup probably is to have it
run on a per-user basis, so it should be disabled by default. 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.

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

best regards,
Erich Schubert

More information about the initscripts-ng-devel mailing list