[NBLUG/talk] Debian init.d and runlevel question

Sean seanvanco at gmail.com
Thu Jun 15 13:38:16 PDT 2006


I am more familiar with Gentoo, but I have done some work with Redhad
and Debian.

The K and S I believe are for "kill" and "start". Wherever the service
is named as S, that service will be started at that run level only.

So if you have /etc/rc2.d set to S40foo, then foo will be started at
the runlevel 2. As I understand it, all other instances (any
exceptions to this?) of /etc/rcX.d/ foo should be set to K.

I'm pretty sure I am correct on this, but if not someone will set me straight.

Sean


On 6/15/06, Bob Blick <bblick at sonic.net> wrote:
> Perhaps someone can clear up my confusion regarding scripts in /etc/init.d
> and symlinks to them in /etc/rcX.d - I'm new to Debian in this regard.
>
> My understanding has always been that if you have a script "foo" in
> /etc/init.d, and a symlink to it in /etc/rc2.d named S40foo, it will be
> run after the S39's when runlevel 2 has been started. If it was named
> K40foo, it would be run when runlevel 2 was exited.
>
> But the README inside rc2.d says:
> To disable a service in this runlevel, rename its script in this directory
> so that the new name begins with a 'K' and a two-digit number, where the
> number is the difference between the two-digit number following the 'S'
> in its current name, and 100.  To re-enable the service, rename the script
> back to its original name beginning with 'S'.
>
> That confuses me - If I rename it with a "K", isn't the linked script
> going to be run when I exit the runlevel?
>
> Any input would be welcome.
>
> Cheerful regards,
>
> Bob
>
>
>
> _______________________________________________
> talk mailing list
> talk at nblug.org
> http://nblug.org/cgi-bin/mailman/listinfo/talk
>



More information about the talk mailing list