include format for /etc/rc.conf

Alex Zbyslaw xfb52 at
Wed Aug 30 09:46:34 UTC 2006

Dan Mahoney, System Admin wrote:

> Hey all,
> Are there any supported formats for INCLUDES in /etc/rc.conf such that 
> I can drop default configs into /etc/rc.conf and then have files in a 
> certain directory (ala includerc) override them?  Basically, I'd like 
> to do mass-updates of several dozen machines' configs normally found 
> in /etc/rc.conf, but then have per-machine configs (like hostnames) 
> elsewhere.

rc.conf is just a shell script so you can "include" a file like:

. /path/to/include

but make sure it exists on every host.  It could easily be

. /etc/rc.conf.`hostname -s`

as long as you don't have a host called local :-)

There is also rc.conf.local where you could put machine specific and 
leave rc.conf for your generic defaults.  Not clear to me if 
rc.conf.local is meant to last though as it is described as "historic".


More information about the freebsd-questions mailing list