[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#601455: general: can't stop daemon using /etc/init.d/foo stop when disabled via /etc/default/foo

tags 601455 - patch
retitle 601455 multiple, annoyingly different ways to disable an init script

Hi Mathias,

Mathias Kub wrote:

> When I try to stop a daemon after I disabled it in /etc/default/foo,
> I get an error-message that I can not stop it, because it is
> disabled.
> Shouldn't I be able to stop it even if I disabled it first?

Yes, I agree that this is a bug.  Nowadays the appropriate way
to disable an init script is to remove the 'S' links without removing
the 'K' links, for example by running

	update-rc.d foo disable


 1. That is not as well known is it ought to be.  For example, section
    4.6.3. "Restricting access to some server services"[1] of
    debian-reference could be clarified to emphasize this method.

 2. Many packages seem to provide ENABLE/DISABLE variables in
    /etc/default/foo, providing a confusing red herring for this
    task --- a second method which does not work nearly as well,
    as you pointed out.

 3. The tempting "update-rc.d foo remove" (which removes the 'K'
    links, too) might _seem_ to work, except that the next time the
    foo package is upgraded, the service is back again.

One possible way to move forward would be to write a patch to the
debian reference and any other pertinent documentation to address (1)
and (3) and (once consensus that this is a good idea is reached) to
file bugs requesting removal of the ENABLE/DISABLE vars to address (2),
blocking this bug by them.  When the last such variable is eliminated
from the default conffiles in /etc/default, this bug could be closed.

A complicating factor is that the sysadmin may already have customized
some ENABLE/DISABLE settings and a move like this should not override
their settings.  So perhaps packages should stop advertising the
ENABLE/DISABLE vars in /etc/default/<package>, but continue to respect
them when set.



[1] http://www.debian.org/doc/manuals/debian-reference/ch04.en.html#_restricting_access_to_some_server_services

Reply to: