本文主要写了upstart的启动控制原理。这篇文章的目的在于可以人为的控制upstart初始的的运行等级。
此外,本文附带了大量真实的SHELL脚本文件的内容,这些内容都是服务器刚刚初始化完成后的命令,即$RUNLEVEL的的值并没有遭到任何修改。
 

{未完成,待续}

/etc/inint.d/rc

dgd@dgdsrv:/etc/init$ cat rc.conf
# rc - System V runlevel compatibility
#
# This task runs the old System V-style rc script when changing between
# runlevels.

description     "System V runlevel compatibility"
author          "Scott James Remnant "

emits deconfiguring-networking
emits unmounted-remote-filesystems

start on runlevel [0123456]
stop on runlevel [!$RUNLEVEL]

export RUNLEVEL
export PREVLEVEL

console output
env INIT_VERBOSE

task

exec /etc/init.d/rc $RUNLEVEL
dgd@dgdsrv:/etc/init$
 

 

 

dgd@dgdsrv:/etc/init.d$ cat rcS
#! /bin/sh
#
# rcS
#
# Call all S??* scripts in /etc/rcS.d/ in numerical/alphabetical order
#

exec /etc/init.d/rc S
dgd@dgdsrv:/etc/init.d$