whatis rc rc(8) - command scripts for auto-reboot and daemon startup 这些脚本实际位于/etc/rc;通常,位于/etc下的这个配置文件对应于手册的第五部分,所以你可以根据手册对配置文件作正确地修改。但是,如果你打:
man 5 rc 你却会得到以下信息:
No entry for rc in section 5 of the manual 这对于上面提到的它位于手册第八部分来说看起来有点古怪,因为这部分手册包含的是系统维护和操作命令,通常它们都是后台进程。让我们进一步来看一下这个文件:
more /etc/rc # System startup script run by init on autoboot # or after single-user. # Output and error are redirected to console by init, # and the console is the controlling terminal. # Note that almost all of the user-configurable behavior # is no longer in # this file, but rather in /etc/defaults/rc.conf. # Please check that file first before contemplating any changes # here. If you do need to change this file for some reason, we # would like to know about it. 好,相当清晰;看来对于该文件我们自己是不能乱来的。这里有些相当重要的东西对于正确引导我们的系统所必须的。让我们往后跳,看一些重要的部分来找出启动时实际上都发生了些什么。注意当在引导过程中处理rc脚本时,init会把所有的输出和错误信息记录到终端上。
# If there is a global system configuration file, sUCk it in. if [ -f /etc/defaults/rc.conf ]; then . /etc/defaults/rc.conf elif [ -f /etc/rc.conf ]; then . /etc/rc.conf fi 接着它会作一个文件系统连贯性检查。如果你曾经非正常关闭FreeBSD系统,你会在引导过程中看到它在这一步上发出抱怨的。