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

Bob Blick bblick at sonic.net
Thu Jun 15 13:27:29 PDT 2006


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





More information about the talk mailing list