Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jun 2011 10:34:57 +0100
From:      Chris Rees <crees@freebsd.org>
To:        Mark Blackman <mark@exonetric.com>
Cc:        freebsd-rc@freebsd.org
Subject:   Re: Status of /etc/rc.conf.d/servicename feature in rc.subr
Message-ID:  <BANLkTikXxjP_P8aeqebpf3ye=Y%2BypsX1pQ@mail.gmail.com>
In-Reply-To: <8373928E-23AF-41D1-83BA-34324C38BB02@exonetric.com>
References:  <BANLkTimmVTjA1Dkm-hMz7ZMEsGNBSxm4kA@mail.gmail.com> <8373928E-23AF-41D1-83BA-34324C38BB02@exonetric.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 20 June 2011 09:57, Mark Blackman <mark@exonetric.com> wrote:
> On 20 Jun 2011, at 09:20, Stefan Midjich wrote:
>
>> I noticed in /etc/rc.subr that the function load_rc_config sources
>> /etc/rc.conf.d/${_name}. This is however undocumented, NetBSD mentions
>> this feature in rc.conf(5) but FreeBSD does not.
>>
>> I have two questions, is this a new undocumented feature, or an old
>> one being phased out? I'm hoping it's a new because I really want this
>> feature.
>>
>> Second question, how do I use it? I've tried to track the ${_name}
>> variable but I can't find anyone calling the parent function
>> load_rc_config_var() where the name variable is set from its first
>> argument.
>
> I've added a file called 'jail' there =A0and /etc/rc.d/jail will then
> pick up configuration data from /etc/rc.conf.d/jail.
>
> I think it's quite a useful feature and would support it's
> continued existence. However I wonder who else might be interested
> in a better referencing method more like a perl hash or YAML files
> for the configuration data.
>
> There's a clear nesting behaviour there built from shell variable
> names that I find a little bit overextended.
>
> - Mark

Please refer to [1] -- rc.conf.d should not be going away, but it's
undocumented because its behaviour has not been finalised -- use at
your own risk, and keep up with rc.subr changes!

Chris

[1] http://freebsd.1045724.n5.nabble.com/RFC-Change-Request-Create-usefulne=
ss-in-rc-subr-etc-rc-conf-d-conf-namespace-td4380385.html



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTikXxjP_P8aeqebpf3ye=Y%2BypsX1pQ>