Subject: Re: default values for variables in rc.d scripts
To: None <tech-pkg@netbsd.org>
From: Luke Mewburn <lukem@netbsd.org>
List: tech-pkg
Date: 11/05/2002 07:54:42
On Mon, Nov 04, 2002 at 09:43:08PM +0100, Klaus Heinz wrote:
| Hi,
|
| with NetBSD 1.5.x. load_rc_config() (in rc.subr) loads /etc/rc.conf and
| thus overrides any values for variables (${rcvar} and ${rcvar}_flags)
| set in the rc.d script.
|
| With 1.6, load_rc_config() only loads /etc/rc.conf once during startup
| (depends on $_rc_conf_loaded) and does _not_ override the variables.
|
| How are we supposed to set default values for those variables in package
| rc.d scripts?
Instead of
foo=YES
try
: ${foo:=YES}
(which only sets foo=YES if foo isn't already defined)
Alternatively, I could consider adding support into load_rc_config()
to force a reload of rc.conf.
Luke.