From owner-freebsd-arch@FreeBSD.ORG Tue Feb 24 10:10:50 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4892916A4CE for ; Tue, 24 Feb 2004 10:10:50 -0800 (PST) Received: from postman.arcor.de (postman2.arcor-online.net [151.189.0.152]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E00943D1F for ; Tue, 24 Feb 2004 10:10:49 -0800 (PST) (envelope-from eikemeier@fillmore-labs.com) Received: from fillmore.dyndns.org (port-212-202-51-138.reverse.qsc.de [212.202.51.138]) (authenticated bits=0)i1OIAdf5003948 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 24 Feb 2004 19:10:44 +0100 (MET) Received: from [172.16.0.2] (helo=fillmore-labs.com) by fillmore.dyndns.org with esmtp (Exim 4.30; FreeBSD) id 1Avh0t-0004t1-Lw; Tue, 24 Feb 2004 19:10:35 +0100 Message-ID: <403B9396.8020404@fillmore-labs.com> Date: Tue, 24 Feb 2004 19:10:30 +0100 From: Oliver Eikemeier Organization: Fillmore Labs GmbH - http://www.fillmore-labs.com/ MIME-Version: 1.0 To: Mike Makonnen , freebsd-arch@FreeBSD.org References: <20040223084146.GA4202@mobile.acs-et.com> <4039D9FF.40208@fillmore-labs.com> <20040224072401.GB1125@mobile.acs-et.com> <403B206B.7000101@fillmore-labs.com> <20040224103932.GA20467@mobile.acs-et.com> <403B403C.7040701@fillmore-labs.com> In-Reply-To: <403B403C.7040701@fillmore-labs.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit User-Agent: KMail/1.5.9 Subject: Re: rc.d and ports X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Feb 2004 18:10:50 -0000 Oliver Eikemeier wrote: > [...] > > I guess we agree here. I'll post a follow-up with uses > ${PREFIX}/etc/{rc.conf,defaults/rc.conf,rc.conf.d} too. The problem here > is that you'll have to support different prefixes, like /usr/X11R6. Ok, before I send my next patch we should agree on the following: If we assume the following rules: i) defaults are overwritten by user editable files ii) configuration in base overwrites configuration in prefix iii) individual command configuration overwrites common configuration where i) breaks ii) breaks iii), we get the following load order for a port with name $_command and prefix $_prefix: 1. "$_prefix"/etc/defaults/rc.conf (read only, but unsure who may provide it) 2. /etc/defaults/rc.conf (read only, base system) 3. "$_prefix"/etc/defaults/rc.conf.d/"$_command" (read only, may be installed by the port) 4. "$_prefix"/etc/rc.conf (user editable) 5. "$_prefix"/etc/rc.conf.d/"$_command" (user editable) 6. /etc/rc.conf ( + /etc/rc.conf.local, both user editable) 7. /etc/rc.conf.d/"$_command" (user editable) where we have to source /etc/defaults/rc.conf and /etc/rc.conf *every* time, since we don't know whether other config files overwrite parts of them. I suggest the syntax load_rc_config "$_command" "$_prefix" since the port knows where it lives, omitting the second argument for base scripts. Does everybody agree, or is a different load order more appropriate? -Oliver