阅读upstart的README 。/usr/shard/doc/upstart下的README(需要解压缩) O Where are initscripts installed? How are initscripts started and stopped? O What order are initscripts started and stopped in? O How do I find the current/previous runlevel? 运行runlevel命令 运行man runlevel How do I change the runlevel? How do I change the default runlevel? How do I shutdown the machine? O How do I change the behaviour of Control-Alt-Delete? 4口4四1是4P,刀00 练奇兰(xlancher南uste,ed加,cn)(升界丸应 瓷人式操作委蛇 December 9.2014 7 29
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 阅读upstart的README /usr/shard/doc/upstart下的README(需要解压缩) 1. Where are initscripts installed? 2. How are initscripts started and stopped? 3. What order are initscripts started and stopped in? 4. How do I find the current/previous runlevel? ▶ 运行runlevel命令 ▶ 运行man runlevel 5. How do I change the runlevel? 6. How do I change the default runlevel? 7. How do I shutdown the machine? 8. How do I change the behaviour of Control-Alt-Delete? 9. ... 陈香兰(xlanchen@ustc.edu.cn) (计算机应用教研室@计算机学院嵌入式系统实验室 嵌入式操作系统 @苏州研究院中国科学技术大学Fall 2014) December 9, 2014 7 / 29
阅读upstart帮助信息I man upstart ●关于init init is the parent of all processes on the system,it is executed by the kernel and is responsible for starting all other processes;it is the parent of all processes whose natural parents have died and it is responsible for reaping those when they die. 。关于job Processes managed by init are known as jobs and are defined by files in the /etc/init directory. job与job配置文件 o关于事件event ·job会因为事件的发生而自动的start.或者stop(根据其配置文件) 4口4四¥是42在刀00 陈香兰(xlanchenoustc,ed加,cn)(升异数应 长人式择作系统 Dece0er9.20148/29
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 阅读upstart帮助信息 I man upstart 关于init ▶ init is the parent of all processes on the system, it is executed by the kernel and is responsible for starting all other processes; it is the parent of all processes whose natural parents have died and it is responsible for reaping those when they die. 关于job ▶ Processes managed by init are known as jobs and are defined by files in the /etc/init directory. ▶ job与job配置文件 关于事件event ▶ job会因为事件的发生而自动的start或者stop (根据其配置文件) 陈香兰(xlanchen@ustc.edu.cn) (计算机应用教研室@计算机学院嵌入式系统实验室 嵌入式操作系统 @苏州研究院中国科学技术大学Fall 2014) December 9, 2014 8 / 29
阅读upstart帮助信息II ·关键的几个事件 ,startup事件 ★由init产生 starting~started、stopping、stopped事件 ★产生:随着job状态的改变 oJob的状态和lifecycle(参见man upstart) 4口4四1是42刀00 陈香兰(xlanchenoustc,edu,cn)(升界丸应 长人式操作系统 December9.20149/29
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 阅读upstart帮助信息 II 关键的几个事件 ▶ startup事件 ⋆ 由init产生 ▶ starting、started、stopping、stopped事件 ⋆ 产生:随着job状态的改变 Job的状态和lifecycle(参见man upstart) 陈香兰(xlanchen@ustc.edu.cn) (计算机应用教研室@计算机学院嵌入式系统实验室 嵌入式操作系统 @苏州研究院中国科学技术大学Fall 2014) December 9, 2014 9 / 29
Upstart中的事件 。Init即Upstart,是一个基于事件的守护进程 ●事件代表系统状态的变化,产生的事件会发送给init进程 ·job的状态也是系统状态,因此job状态的变化会产生相关事件 。事件可以带参数,如runlevel事件 ●job的配置文件中,列出了job启动、停止的条件, 这些条件与事件有关 ●job在运行时,可能会根据需要触发某些事件 (具体参见相关配置文件) 1口4¥是4P在刀00 陈香兰(xlanchenoustc,edu,cn)(升界丸应 长人式操作香统 December 9.2014 10 /29
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Upstart中的事件 Init即Upstart,是一个基于事件的守护进程 事件代表系统状态的变化,产生的事件会发送给init进程 ▶ job的状态也是系统状态,因此job状态的变化会产生相关事件 事件可以带参数,如runlevel事件 job的配置文件中,列出了job启动、停止的条件, 这些条件与事件有关 job在运行时,可能会根据需要触发某些事件 (具体参见相关配置文件) 陈香兰(xlanchen@ustc.edu.cn) (计算机应用教研室@计算机学院嵌入式系统实验室 嵌入式操作系统 @苏州研究院中国科学技术大学Fall 2014) December 9, 2014 10 / 29