The "/etc/rc" (resource configuration) script executes rc.* files during the
last phase of the bootstrap. FreeBSD has a very nice feature which is
referred to as startup directories. These directories are 'user' defined in
"/etc/rc.conf". If you look in "/etc/defaults/rc.conf" you will see a line
like this:
local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d"
# This setting determines which directories are scanned for
# shell scripts at startup. Executable files within these
# directories are run in alphabetical order.
If you want something to be started at boot time, create a file which ends
with ".sh" in a startup directory. At boot time, each file ending with ".sh"
will be executed. The order of execution is alphabetical. If you need the
files to be executed in a specific order, try numbering the files. For
example:
000This.Will.Run.First.sh
020This.Will.Run.Next.sh
030And.Then.This.sh
Most BSD default startup files are located in "/etc" all start with the
prefix "rc.". The master configuration files are "/etc/defaults/rc.conf",
and "/etc/rc.conf". The "/etc/rc.conf" file is the user editable file.
The "/etc/defaults/rc.conf" should not be modified, all settings in the
"/etc/rc.conf" file will override it's settings so the administrator should
make all changes in "/etc/rc.conf".