Re: /etc/init.d/ - add/remove services
In article <[🔎] firstname.lastname@example.org>,
Thomas Hood <email@example.com> wrote:
>"Miquel van Smoorenburg" <miquels () cistron ! nl> wrote in part:
>> A thought just hit me.
>> What if we added a "update-rc.d <name> enable|disable" command?
>This has already been wished for. See sysv-rc wish #214757
No, that's not what I mean. That is a runlevel editor. I mean
a generic disable-startup-at-boottime and enable-startup-at-boottime
option, which is what is
>and sysvinit wish #67095.
Yes, that's what I mean, but renaming symlinks looks ugly to
me, while pointing them to /dev/null seems more elegant.
Maybe it's just me.
>> That has never been done because the implementation would
>> be awkward and wouldn't fit into the sysv-rc design.
>> But what if we used the destination of the symlink ?
>Suppose you have a service foo enabled in runlevel 2 and disabled
>in runlevel 3. On moving from 2 to 3 you want foo to be stopped.
>However, if foo is disabled in runlevel 3 by having its S entry
>symlinked to /bin/true then it won't be stopped.
That's another issue. That should be handled by a runlevel
>The right thing to do is to write a simple runlevel editing tool
>and include it in the sysv-rc package. This tool would rename
>Snn symlinks to K(100-nn) symlinks and vice versa
K(100-nn) .. hmm, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=216028
>and would keep
>records of what it had done so that reversion was easy. The sysv
>update-rc.d program would be rewritten to work through the runlevel
>editing tool; commands coming from update-rc.d would determine what
>the tool considered to be the "default" setting.
>Other init systems would implement this tool differently, of course.
Ouch, complicated ...