rc.init文件启动过程
- sources the /etc/rc.conf script.
- sources the /etc/rc.d/functions script.
- displays a welcome message.
- mounts various virtual file systems.
- creates dummy device files.
- starts minilogd.
- outputs messages from dmesg.
- configures the hardware clock.
- empties the /proc/sys/kernel/hotplug file.
- starts udev and checks for udev events .
- starts the loopback interface.
- loads modules from the MODULES array defined in rc.conf.
- configures RAID and encrypted filesystem mappings.
- runs a forced check of partitions (fsck) if the /etc/fstab file contains instructions to do so.
- mounts local partitions and swap (networked drives are not mounted before a network profile is up).
- activates swap areas.
- sets the hostname, locale and system clock as defined in rc.conf.
- removes various leftover/temporary files, such as /tmp/*.
- configures the locale, console, and keyboard mappings.
- sets the console font.
- writes output from dmesg to /var/log/dmesg.log.
References