Subject: Re: CVS commit: basesrc/etc/rc.conf.d
To: Ignatios Souvatzis <is@netbsd.org>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-userlevel
Date: 04/20/2002 10:55:06
On Sat, 20 Apr 2002, Ignatios Souvatzis wrote:

> On Fri, Apr 19, 2002 at 03:10:58PM +1000, Luke Mewburn wrote:
> >
> > what about just having a section at the top of the rc.d script itself
> > that sets the defaults?
> >
> > e.g, for /etc/rc.d/ntpdate, something like:
> > 	/etc/rc.d/ntpdate:
> >     [...]
> > 	. /etc/rc.subr
> >
> >  --> new section follows
> >  --> contains "defaults: " and then a description of what it does
> > 	# defaults: set date and time via NTP
> > 	ntpdate=NO
> > 	ntpdate_flags="-b -s"
> >
> > 	name="ntpdate"
> > 	rcvar=$name
> > 	start_cmd="ntpdate_start"
> >     [...]
> > 	load_rc_config $name
> > 	run_rc_command "$1"
>
> would, in this case, the defaults be overridden by rc.conf?

It would, because "rc.conf" is sourced by load_rc_config (near the
bottom), not by ". /etc/subr". I missed that on the first read, too.

Frederick