So all the symbolic links in /etc/rc2.d/ actually point out to executable scripts in /etc/init.d/.
If you perform an ls -l /etc/rc2.d you will see an output which can look something like this:

/etc/init.d/script_name start|stop|restart
Now, in order to prevent a daemon from running at system start-up, for example S20ircd-ircu (the ircu IRC server), all you have to do is rename it to a name which starts with K, then a two-digit number made up from the difference between 100 and the number which follows S, and then its name. For our example, that would be (as root):
mv S20ircd-ircu K80ircd-ircu
The next time you reboot your Debian box, the IRC daemon will not be started automatically, but you'll be able to rename it back to S20ircd-ircu or start it manually, as root, like this:
/etc/init.d/ircd-ircu start
A simple and clear explanation on how things work can be found in the files /etc/rc2.d/README and /etc/init.d/README.
One of the popular uses of this is to prevent display managers from starting up, for example gdm or kdm:
mv S99kdm K01kdm
This will prevent kdm (KDE display manager) from starting up, leaving you at a shell login prompt. Useful when you only need a server, or want to live in command-line only for a while. To start it up, just use, as root:
/etc/init.d/kdm start
2 comments:
man update-inetd
If the 'sysv-rc' package is installed: "man update-rc.d"
or you can install rcconf and all of that will be much simpler.
Post a Comment