Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Aug 2006 10:45:57 +0100
From:      Alex Zbyslaw <xfb52@dial.pipex.com>
To:        "Dan Mahoney, System Admin" <danm@prime.gushi.org>
Cc:        questions@freebsd.org
Subject:   Re: include format for /etc/rc.conf
Message-ID:  <44F55E55.4090401@dial.pipex.com>
In-Reply-To: <20060830033859.R53222@prime.gushi.org>
References:  <20060830033859.R53222@prime.gushi.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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".

--Alex







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44F55E55.4090401>