linux是按运行级别运行/etc/rc.d/rcX.d下面的文件X表示运行级别
X是在文件/etc/inittab中指定的,看看该文件中的
# Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:
我的默认启动解别是5那么,linux启动后会运行/etc/rc.d/rc5.d
中以S开头的文件,S后面的数字表示运行的顺序,K开始的文件
好像表示结束时执行的脚本。(S-start K-killproc)