drwxr-xr-x 2 root root 4096 2012-01-29 12:20 rc0.d
drwxr-xr-x 2 root root 4096 2012-01-29 12:20 rc1.d
drwxr-xr-x 2 root root 4096 2012-01-29 12:20 rc2.d
drwxr-xr-x 2 root root 4096 2012-01-29 12:20 rc3.d
drwxr-xr-x 2 root root 4096 2012-01-29 12:20 rc4.d
drwxr-xr-x 2 root root 4096 2012-01-29 12:20 rc5.d
drwxr-xr-x 2 root root 4096 2012-01-29 12:20 rc6.d
drwxr-xr-x 2 root root 4096 2012-01-29 12:20 rc1.d
drwxr-xr-x 2 root root 4096 2012-01-29 12:20 rc2.d
drwxr-xr-x 2 root root 4096 2012-01-29 12:20 rc3.d
drwxr-xr-x 2 root root 4096 2012-01-29 12:20 rc4.d
drwxr-xr-x 2 root root 4096 2012-01-29 12:20 rc5.d
drwxr-xr-x 2 root root 4096 2012-01-29 12:20 rc6.d
Each of these corresponds to a particular runlevel.
In Ubuntu, runlevel 0 is for powerdown, runlevel 6 is for reboot, runlevel 1 is for single user mode and runlevels 2-5 represent regular multi-user mode with GUI and are all the same. (Other Linux OSes may make a distinction but Ubuntu does not).
Let's take a look at the run level 5 directory.
suraj@suraj-Satellite-T135D:/etc/rc5.d$ ls -l
total 4
-rw-r--r-- 1 root root 677 2011-12-15 01:40 README
lrwxrwxrwx 1 root root 26 2012-01-02 08:00 S20clamav-freshclam -> ../init.d/clamav-freshclam
lrwxrwxrwx 1 root root 20 2011-10-30 22:30 S20kerneloops -> ../init.d/kerneloops
lrwxrwxrwx 1 root root 27 2011-10-30 22:30 S20speech-dispatcher -> ../init.d/speech-dispatcher
lrwxrwxrwx 1 root root 19 2012-01-29 08:14 S20tinyproxy -> ../init.d/tinyproxy
lrwxrwxrwx 1 root root 29 2011-10-30 22:30 S20unattended-upgrades -> ../init.d/unattended-upgrades
lrwxrwxrwx 1 root root 19 2011-10-30 22:30 S25bluetooth -> ../init.d/bluetooth
lrwxrwxrwx 1 root root 20 2011-10-30 22:30 S50pulseaudio -> ../init.d/pulseaudio
lrwxrwxrwx 1 root root 15 2011-10-30 22:30 S50rsync -> ../init.d/rsync
lrwxrwxrwx 1 root root 15 2011-10-30 22:30 S50saned -> ../init.d/saned
lrwxrwxrwx 1 root root 19 2011-10-30 22:30 S70dns-clean -> ../init.d/dns-clean
lrwxrwxrwx 1 root root 18 2011-10-30 22:30 S70pppd-dns -> ../init.d/pppd-dns
lrwxrwxrwx 1 root root 14 2011-10-30 22:30 S75sudo -> ../init.d/sudo
lrwxrwxrwx 1 root root 17 2012-01-29 12:20 S92tomcat6 -> ../init.d/tomcat6
lrwxrwxrwx 1 root root 22 2011-10-30 22:30 S99acpi-support -> ../init.d/acpi-support
lrwxrwxrwx 1 root root 21 2011-10-30 22:30 S99grub-common -> ../init.d/grub-common
lrwxrwxrwx 1 root root 18 2011-10-30 22:30 S99ondemand -> ../init.d/ondemand
lrwxrwxrwx 1 root root 18 2011-10-30 22:30 S99rc.local -> ../init.d/rc.local
Let's take a look at the README file in this directory.
suraj@suraj-Satellite-T135D:/etc/rc5.d$ more README
The scripts in this directory are executed each time the system enters
this runlevel.
The scripts are all symbolic links whose targets are located in
/etc/init.d/ .
To disable a service in this runlevel, rename its script in this
directory so that the new name begins with a 'K' and a two-digit
number, and run 'update-rc.d script defaults' to reorder the scripts
according to dependencies. A warning about the current runlevels
being enabled not matching the LSB header in the init.d script will be
printed. To re-enable the service, rename the script back to its
original name beginning with 'S' and run update-rc.d again.
For a more information see /etc/init.d/README.
No comments:
Post a Comment