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

Re: Extending the update-rc.d API to change runlevel and disable scripts?

On Fri, Apr 25, 2008 at 10:15:27AM +0200, Petter Reinholdtsen wrote:
> I believe we should extend the update-rc.d interface to provide a few
> more operations that are commonly needed and commonly done wrong.

Neat, thanks for the initiative.

> Disable scripts
> ---------------
> This has to be done manually or using one of the tools provided for
> sysv-rc, and is different for earch boot system used.  I propose an
> operation like
>   update-rc.d script disable
> It will rename all start symlinks to stop symlinks for all runlevels.
> For dependency based boot sequencing, it will also update the sequence
> numbers to reflect this new entry.

I would add the option to specify a (set of) runlevel, so that one can
disable a service just for a subset of the runlevels. I'm myself using
sysv-rc-conf for these things and frequently I remove links only for the
default runlevel.

It should also be considered what the default should be if no subset of
the runlevels is specified. To me, both "all" and "only the default
runlevel" make sense. Though probably "all" is better, as the default
runlevel can be changed later on without that update-rc.d notice
anything about that.

Similarly, a counter action for this new "disable" action should be
provided. I frequently dig into postinsts to retrieve the info about in
which position I should put back a service I've disabled. (Sure this
won't be needed with dependency based boot system, but in the meantime
it still is.)


Stefano Zacchiroli -*- PhD in Computer Science ............... now what?
zack@{upsilon.cc,cs.unibo.it,debian.org}  -<%>-  http://upsilon.cc/zack/
(15:56:48)  Zack: e la demo dema ?    /\    All one has to do is hit the
(15:57:15)  Bac: no, la demo scema    \/    right keys at the right time

Attachment: signature.asc
Description: Digital signature

Reply to: