12.3 Core Configuration

The principal location for system configuration information is within /etc/rc.conf. This file contains a wide range of configuration information, principally used at system startup to configure the system. Its name directly implies this; it is configuration information for the rc* files.

An administrator should make entries in rc.conf to override the default settings from /etc/defaults/rc.conf. The defaults file should not be copied verbatim to /etc - it contains default values, not examples. All system-specific changes should be made in the rc.conf file itself.

A number of strategies may be applied in clustered applications to separate site-wide configuration from system-specific configuration in order to keep administration overhead down. The recommended approach is to place system-specific configuration into /etc/rc.conf.local. For example:

rc.conf can then be distributed to every system using rsync or a similar program, while rc.conf.local remains unique.

Upgrading the system using sysinstall(8) or make world will not overwrite rc.conf, so system configuration information will not be lost.

Tip: The /etc/rc.conf configuration file is parsed by sh(1). This allows system operators to add a certain amount of logic to this file, which may help to create very complex configuration scenarios. Please see rc.conf(5) for further information on this topic.