How does rc(8) work?
The main files a system administrator should concentrate on are /etc/rc.conf (or /etc/rc.conf.local), /etc/rc.local and /etc/rc.shutdown. To get a look of how the rc(8) procedure works, here is the flow: After the kernel is booted, /etc/rc is started: • Filesystems are checked. • Configuration variables are read in from /etc/rc.conf and, afterwards, /etc/rc.conf.local. Settings in rc.conf.local will override those in rc.conf. • Filesystems are mounted • Clears out /tmp and preserves any editor files • Configures the network via /etc/netstart • Configures your interfaces up. • Sets your hostname, domainname, etc. • Starts system daemons • Performs various other checks (quotas, savecore, etc) • Local daemons are run, via /etc/rc.