$ ls -l total 4 -rw-r--r-- 1 root root 677 Feb 16 2016 README lrwxrwxrwx 1 root root 20 Aug 30 14:40 S20kerneloops -> ../init.d/kerneloops lrwxrwxrwx 1 root root 15 Aug 30 14:40 S20rsync -> ../init.d/rsync lrwxrwxrwx 1 root root 23 Aug 30 16:10 S20smartmontools -> ../init.d/smartmontools lrwxrwxrwx 1 root root 27 Aug 30 14:40 S20speech-dispatcher -> ../init.d/speech-dispatcher lrwxrwxrwx 1 root root 17 Aug 31 14:12 S20sysstat -> ../init.d/sysstat lrwxrwxrwx 1 root root 15 Aug 30 14:40 S50saned -> ../init.d/saned lrwxrwxrwx 1 root root 19 Aug 30 14:40 S70dns-clean -> ../init.d/dns-clean lrwxrwxrwx 1 root root 18 Aug 30 14:40 S70pppd-dns -> ../init.d/pppd-dns lrwxrwxrwx 1 root root 21 Aug 30 14:40 S99grub-common -> ../init.d/grub-common lrwxrwxrwx 1 root root 18 Aug 30 14:40 S99ondemand -> ../init.d/ondemand lrwxrwxrwx 1 root root 18 Aug 30 14:40 S99rc.local -> ../init.d/rc.local
如你所想,目录 /etc/rc1.d 因运行级别 1 的特殊而不同。它包含的符号链接指向非常不同的一套脚本。 同样也要注意到其中一些脚本以 K 开头命名,而另一些与其它运行级别脚本一样以 S 开头命名。这是因为当系统进入单用户模式时, 一些服务需要停止。 然而这些 K 开头的符号链接指向了其它级别 S 开头的符号链接的同一文件时, K(kill)表示这个脚本将以指示其停止的参数执行,而不是以启动的参数执行。
1 2 3 4 5 6 7 8 9 10 11 12 13
/etc/rc1.d$ ls -l total 4 lrwxrwxrwx 1 root root 20 Aug 30 14:40 K20kerneloops -> ../init.d/kerneloops lrwxrwxrwx 1 root root 15 Aug 30 14:40 K20rsync -> ../init.d/rsync lrwxrwxrwx 1 root root 15 Aug 30 14:40 K20saned -> ../init.d/saned lrwxrwxrwx 1 root root 23 Aug 30 16:10 K20smartmontools -> ../init.d/smartmontools lrwxrwxrwx 1 root root 27 Aug 30 14:40 K20speech-dispatcher -> ../init.d/speech-dispatcher -rw-r--r-- 1 root root 369 Mar 12 2014 README lrwxrwxrwx 1 root root 19 Aug 30 14:40 S30killprocs -> ../init.d/killprocs lrwxrwxrwx 1 root root 19 Aug 30 14:40 S70dns-clean -> ../init.d/dns-clean lrwxrwxrwx 1 root root 18 Aug 30 14:40 S70pppd-dns -> ../init.d/pppd-dns lrwxrwxrwx 1 root root 16 Aug 30 14:40 S90single -> ../init.d/single