The scripts need to be executed at boot time was put in the /etc/init.d
,and files contained in /etc/rc*.d
was the symbolic links point to files in /etc/init.d.Furthermore the names of the symbolic links indicate whether the service is to be started (S*) or stopped (killed, K*) in specific runlevel.
I issue a command “ls -al” to inspect the files in the /etc/rc3.d
,the output as follows:
drwxr-xr-x. 2 root root 4096 Apr 6 23:04 .
drwxr-xr-x. 10 root root 4096 May 22 2015 ..
lrwxrwxrwx. 1 root root 20 May 22 2015 K50netconsole -> ../init.d/netconsole
lrwxrwxrwx. 1 root root 17 May 22 2015 K90network -> ../init.d/network
lrwxrwxrwx. 1 root root 17 May 22 2015 S00livesys -> ../init.d/livesys
lrwxrwxrwx. 1 root root 16 Apr 6 23:04 S85mongod -> ../init.d/mongod
lrwxrwxrwx. 1 root root 15 May 31 2015 S95jexec -> ../init.d/jexec
lrwxrwxrwx. 1 root root 22 May 22 2015 S99livesys-late -> ../init.d/livesys-late
I supposes that start script and kill script should appear in pairs, but it`s wrong,why?