LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   startup process (https://www.linuxquestions.org/questions/linux-newbie-8/startup-process-684914/)

ust 11-20-2008 10:50 AM

startup process
 
In my linux system , there are many boot up process are added in /etc/rc.d/init.d , I know all these process will be run when server boot up , some process name begins with S, I would like to ask what is the mean of S1 , S2 , S3... ? is boot sequence ? this kind of process will run after or before the o/s started ?

thx

knockout_artist 11-20-2008 11:19 AM

Quote:

Originally Posted by ust (Post 3348823)
In my linux system , there are many boot up process are added in /etc/rc.d/init.d , I know all these process will be run when server boot up , some process name begins with S, I would like to ask what is the mean of S1 , S2 , S3... ? is boot sequence ? this kind of process will run after or before the o/s started ?

thx


S=startup
K=that runs when you shutdown machine.

numbers are the sequence they run in.

Hobbletoe 11-20-2008 12:21 PM

It should also be noted that only the capital letters are run. If you have an s99ftpd file to kick off an ftp daemon, it is not going to work until you change that to S99ftpd.

kevinalm 11-20-2008 12:36 PM

/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? ;)


All times are GMT -5. The time now is 05:47 PM.