Wow, I didn’t know that…

Reading does help and I finally agree with my dad about this. And doing a bit of reading myself I came to know about these little facts:

 # The run level scripts found in /etc/rc.d/rcX.d, if you had noticed, starts with a K or S. The K stands for kill and the S stands for Start.

[hobbes@server ~]$ ls -l /etc/rc.d/rc5.d/
total 392
lrwxrwxrwx 1 root root 13 2007-09-23 07:42 K01apt -> ../init.d/apt
lrwxrwxrwx 1 root root 15 2007-09-21 16:52 K01smolt -> ../init.d/smolt
lrwxrwxrwx 1 root root 24 2007-09-21 16:51 K02avahi-dnsconfd -> ../init.d/avahi-dnsconfd
lrwxrwxrwx 1 root root 21 2007-09-21 16:53 S12restorecond -> ../init.d/restorecond
lrwxrwxrwx 1 root root 16 2007-09-21 16:49 S12syslog -> ../init.d/syslog
lrwxrwxrwx 1 root root 15 2007-09-21 16:45 S13iscsi -> ../init.d/iscsi
lrwxrwxrwx 1 root root 18 2007-09-21 16:53 S13mcstrans -> ../init.d/mcstrans
lrwxrwxrwx 1 root root 15 2007-10-28 19:46 S13named -> ../init.d/named
lrwxrwxrwx 1 root root 17 2007-09-21 16:47 S13rpcbind -> ../init.d/rpcbind
lrwxrwxrwx 1 root root 24 2007-09-21 16:52 S13setroubleshoot -> ../init.d/setroubleshoot
lrwxrwxrwx 1 root root 22 2007-09-21 17:16 K03yum-updatesd -> ../init.d/yum-updatesd
lrwxrwxrwx 1 root root 14 2007-09-21 16:49 K05innd -> ../init.d/innd
lrwxrwxrwx 1 root root 19 2007-09-21 16:53 K05saslauthd -> ../init.d/saslauthd
lrwxrwxrwx 1 root root 14 2007-10-03 00:03 K10cups -> ../init.d/cups

Take a look at this line:

lrwxrwxrwx 1 root root 14 2007-10-03 00:03 K10cups -> ../init.d/cups

You would see that the file is  K10cups and it is actually linked to /etc/rc.d/init.d/cups file. The /etc/rc file at boot time looks  at this file and passes a stop or Kill argument to /etc/rc.d/init.d/cups. 

Similarly take a look at

lrwxrwxrwx 1 root root 24 2007-09-21 16:52 S13setroubleshoot -> ../init.d/setroubleshoot

/etc/rc would pass a start argument to the  /etc/rc.d/init.d/setroubleshoot. 

This is how services are started at different runlevels.

That’s all folks 

Advertisements
Wow, I didn’t know that…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s