Symbolic Links
Hey guys in the rc level i see symbolic links with S20 or K20 beside a filenames what are these....
|
Start-up scripts. S tells the system to start the application in question at boot time, K (=kill) tells it to leave it alone. The numbers indicate the order in which applications are started at boot time.
|
Under standard unix the script is placed in the directory /etc/init,d. There is no S or K in front. The second number behind S or K means only that the timeming gets OK. For example: you cannot stop tcp before nfs. Or the opposite by starting. All the thing works by ls in shellscript. That means list sequetial
|
If i want to add a script in the init.d and create links in the run levels is there a way of correctly doing it so that it will act normally and the script will load properly upon boot.
|
Most of those scipts are in shell, so have a look at a few and pick one that's close to what you want, then make your own copy.
It's usually advised that you put your stuff in /etc/rc.local file, or the equiv for your distro. Should be that for Centos, not sure about Ubuntu. |
A tip: If you want to stop a service from starting when you enter a particular run level, change the capital S to lower case S in the relevant directory.
For example, if you don't want sendmail to start when you enter run level 2: Code:
mv /etc/rc2.d/S99sendmail /etc/rc2.d/s99sendmail |
All times are GMT -5. The time now is 08:52 AM. |