From owner-freebsd-current@FreeBSD.ORG Sun Nov 4 22:46:18 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5C4A16A417 for ; Sun, 4 Nov 2007 22:46:18 +0000 (UTC) (envelope-from SRS0=ecbb5e0196af4486cc45567e0c7e5b18df235598=509=es.net=oberman@es.net) Received: from postal1.es.net (postal1.es.net [IPv6:2001:400:14:3::6]) by mx1.freebsd.org (Postfix) with ESMTP id 4261A13C4B8 for ; Sun, 4 Nov 2007 22:46:18 +0000 (UTC) (envelope-from SRS0=ecbb5e0196af4486cc45567e0c7e5b18df235598=509=es.net=oberman@es.net) Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by postal1.es.net (Postal Node 1) with ESMTP (SSL) id JHY65415; Sun, 04 Nov 2007 15:46:15 -0700 Received: from ptavv.es.net (ptavv.es.net [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id 2EA9145010; Sun, 4 Nov 2007 14:46:15 -0800 (PST) To: Marcin Wisnicki In-Reply-To: Your message of "Sun, 04 Nov 2007 20:50:03 GMT." Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1194216375_61144P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Sun, 04 Nov 2007 14:46:15 -0800 From: "Kevin Oberman" Message-Id: <20071104224615.2EA9145010@ptavv.es.net> X-Sender-IP: 198.128.4.29 X-Sender-Domain: es.net X-Recipent: ;; X-Sender: X-To_Name: Marcin Wisnicki X-To_Domain: gmail.com X-To: Marcin Wisnicki X-To_Email: mwisnicki+freebsd@gmail.com X-To_Alias: mwisnicki+freebsd Cc: freebsd-current@freebsd.org Subject: Re: [PATCH] Overriding rc.conf in loader X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Nov 2007 22:46:18 -0000 --==_Exmh_1194216375_61144P Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > From: Marcin Wisnicki > Date: Sun, 4 Nov 2007 20:50:03 +0000 (UTC) > Sender: owner-freebsd-current@freebsd.org > > 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. While I'm sure many will question the value of this if they use FreeBSD only on servers, I think it is of some value for desktops and substantial value for laptops where the environment is always changing. For example, I might want to change network configuration or shutdown the Bluetooth and WiFi when flying. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751 --==_Exmh_1194216375_61144P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) Comment: Exmh version 2.5 06/03/2002 iD8DBQFHLku3kn3rs5h7N1ERAmkqAKCQCkjP2sQzv7CQlVzvoNLJw+snCQCfRMfO 0PF04jzEKIEmqVcyGZFTisM= =PPqZ -----END PGP SIGNATURE----- --==_Exmh_1194216375_61144P--