From owner-freebsd-current@FreeBSD.ORG Sun Nov 4 20:50:35 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 ADFB816A419 for ; Sun, 4 Nov 2007 20:50:35 +0000 (UTC) (envelope-from freebsd-current@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 6BE0F13C4BC for ; Sun, 4 Nov 2007 20:50:34 +0000 (UTC) (envelope-from freebsd-current@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IomQ9-0000XY-5y for freebsd-current@freebsd.org; Sun, 04 Nov 2007 20:50:13 +0000 Received: from xdsl-10260.wroclaw.dialog.net.pl ([84.40.242.20]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 04 Nov 2007 20:50:13 +0000 Received: from mwisnicki+freebsd by xdsl-10260.wroclaw.dialog.net.pl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 04 Nov 2007 20:50:13 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-current@freebsd.org From: Marcin Wisnicki Date: Sun, 4 Nov 2007 20:50:03 +0000 (UTC) Lines: 33 Message-ID: References: <472E041D.3090801@conducive.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: xdsl-10260.wroclaw.dialog.net.pl User-Agent: Pan/0.131 (Ghosts: First Variation) Sender: news 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 20:50:35 -0000 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.