I leave notes here that I find particularly worth remembering myself.
Unix runlevel scripts: Finally the first character makes sense!
Posted 05-29-2010 at 04:12 PM by bittner
Tags administration, script
You probably know Unix runlevel scripts. They start with an S or a K, and they are typically located at /etc/rcX.d/ with X being the runlevel (0-6) the script is supposed to run at. For example:
To be precise those S- and K- files are typically symbolic links to scripts that reside in /etc/init.d/, and from my experience I felt they work as follows:
A couple of weeks ago, though, I found this out:
Oh my gosh, finally the answer to my question (I never asked) found me! The K is the "kill", which is definitely not so different from the "stop". But of course: You can't use S to "stop" too when you use it for "start" already...
I could have read the manuals earlier, probably...
Code:
~$ ls -l /etc/rc5.d/*cups lrwxrwxrwx 1 root root 14 2009-12-31 16:35 /etc/rc5.d/S50cups -> ../init.d/cups
- Any symlink starting with an S will result in the script it points to to be executed with the parameter "start"
- Any symlink starting with a K will result in the script it points to to be executed with the parameter "stop"
A couple of weeks ago, though, I found this out:
- S ... means "start"
- K ... means "kill"
Oh my gosh, finally the answer to my question (I never asked) found me! The K is the "kill", which is definitely not so different from the "stop". But of course: You can't use S to "stop" too when you use it for "start" already...
I could have read the manuals earlier, probably...
Total Comments 0