Date: Sun, 4 Nov 2007 20:50:03 +0000 (UTC) From: Marcin Wisnicki <mwisnicki+freebsd@gmail.com> To: freebsd-current@freebsd.org Subject: Re: [PATCH] Overriding rc.conf in loader Message-ID: <fglb9r$4cp$1@ger.gmane.org> References: <fgkqpu$rhp$1@ger.gmane.org> <472E041D.3090801@conducive.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 04 Nov 2007 12:40:45 -0500, 韓家標 Bill Hacker wrote: > Marcin Wisnicki wrote: >> Hi >> >> I thought it would be nice if there was a way to override rc.conf >> variables during boot. Proposed patch implements this using kenv. >> >> With it, you can override any rc variable from loader.conf by prefixing >> its name with 'rc.', some useful examples: >> > Pardon my stupidity... but does this over-ride over rides with other > over rides... > > or what? Pretty much, yes. Assuming I didn't overlook something, the order of assignment is following: 1. suck in /etc/defaults/rc.conf 2. try to set $rc_conf_files from kenv rc.rc_conf_files [*] otherwise leave it as defined in defaults 3. source $rc_conf_files 4. source /etc/rc.conf.d/$name_of_script 5. for each kenv variable named rc.$var set $var [*] lines marked by [*] are added by my patch > > ..and if so, ISTR there may be a better way already... > Not that I know of.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fglb9r$4cp$1>