Welcome to the most active Linux Forum on the web.
Go Back > Blogs > john test
User Name


Rate this Entry

startup process

Posted 07-21-2009 at 01:55 PM by john test

Originally Posted by kevinalm View Post
/etc/rc.d/init.d contains all of the scripts to control all services. Any of them accept a start/stop/restart argument. Now, you have /etc/rc.d/rc1.d,rc2.d, and so on. These correspond to the various runlevels. For example, rc3.d is for text mode console, and rc5.d is x windows. In each of the rcn.d directories are a bunch of symlinks to scipts in init.d. They all begin with S or K (start or kill aka stop). They are arranged in order by the numbers following S or K. Here's the clever bit, the scripts in init.d are aware of the name (symlink) by which they are invoked.(In fact it is possible for any linux command to be coded for this capability, it is inherent in the system.) So when the system enters runlevel 3, it calls the links in rc3.d in order, and the ones starting with S invoke the relevant init.d script with a start argument. When leaving runlevel 3, the K links are called with a stop argument.
Kind of neat, huh?
Posted in Uncategorized
Views 638 Comments 0
« Prev     Main     Next »
Total Comments 0




All times are GMT -5. The time now is 07:59 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration