1:boot.local
这个是系统启动完所有的boot.services之后执行的脚本。# /etc/rc.d/boot.local
# Here you should add things, that should happen directly after booting
# before we're going to the first run level.
#
2:before.local 和 after.local
这个是由/etc/init.d/rc里面来控制的,发生在切换运行级别之前和之后。
结论:如果你想进入系统最后执行的一个变量和参数。应该写入文件after.local
那就是 /etc/init.d 下的几个档案
1. boot.local –> 这个开机启动档案会在 rc5.d 前就有动作
2. halt.local –> 这个关机启动档案会在最后有动作
3. before.local –> 这个档案比较用不到所以不需多做解释
4. after.local –> 这个档案会在 rc5.d 之后有动作 , 就是最重要的开机启动档 , 没有的话 新建一个
上面第三及第四个档案预设是不存在的喔!!
当你看过 /etc/init.d/rc 这个档案就知道为什幺了
所以当你要使用第三或第四个档案时请自己建立, 就像妳写个 shell 一样很简单
例:
vi /etc/init.d/after.local
#! /bin/sh
/usr/tem/run.sh
:wq