From owner-freebsd-arch@FreeBSD.ORG Tue Feb 24 01:59:13 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 8E13216A4CE for ; Tue, 24 Feb 2004 01:59:13 -0800 (PST) Received: from postman.arcor.de (postman2.arcor-online.net [151.189.0.152]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA94343D1F for ; Tue, 24 Feb 2004 01:59:12 -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)i1O9xAf5017624 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 24 Feb 2004 10:59:11 +0100 (MET) Received: from [172.16.0.2] (helo=fillmore-labs.com) by fillmore.dyndns.org with esmtp (Exim 4.30; FreeBSD) id 1AvZLI-0002xg-HZ; Tue, 24 Feb 2004 10:59:08 +0100 Message-ID: <403B206B.7000101@fillmore-labs.com> Date: Tue, 24 Feb 2004 10:59:07 +0100 From: Oliver Eikemeier Organization: Fillmore Labs GmbH - http://www.fillmore-labs.com/ MIME-Version: 1.0 To: Mike Makonnen References: <20040223084146.GA4202@mobile.acs-et.com> <4039D9FF.40208@fillmore-labs.com> <20040224072401.GB1125@mobile.acs-et.com> In-Reply-To: <20040224072401.GB1125@mobile.acs-et.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit User-Agent: KMail/1.5.9 cc: freebsd-arch@FreeBSD.org 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 09:59:13 -0000 Mike Makonnen wrote: > On Mon, Feb 23, 2004 at 11:46:23AM +0100, Oliver Eikemeier wrote: > >>Mike Makonnen wrote: >> >>>Hi, >>> >>>A lot of people have been calling to have ports startup scripts >>>integrated into rc.d. I have finally gotten arround to doing it. >>>Attached are the rc.d patches to make it work, but >>>I will need some cooperation from the ports folks. >> >>See PR 56736, there since Sep 2003: >> >> >>If you don't like it, please provide feedback what you think can be >>improved. > > It looks like you put some effort into it and I appreciate it, but > I'm sorry to say I don't like it at all. It really isn't any better than > the current situation. Basically your patches special case the ports > scripts and hack around rc.d mechanisms to make it > work with ports. This is wrong. If anything the ports should > be modified to fit in the already present rc.d mechanism. I guess I don't fully understand what modifications you suggest for the ports. What is needed to fit into rc.d? >>>The makefile for the port should define a variable: >>> >>>RCVAR_NAME="fooport_enable" >>> >>>Then, logic similar to this should be inserted in the appropriate >>>bsd.port* makefile: >>> >>>if ! grep 1>/dev/null "\$${RCVAR_NAME}=" ${PREFIX}/etc/defaults/rc.conf ; >>>then >>> echo "${RCVAR_NAME}=NO" >> ${PREFIX}/etc/defaults/rc.conf >>>fi >> >>I guess we don't need this (and shouldn't do it, since >>${PREFIX}/etc/defaults/rc.conf >>might be read-only). Defaulting xxx_enable to "NO" seems to be sufficient, >>with >> >> [ -z "$xxx_enable" ] && xxx_enable="NO" >>or >> xxx_enable=${xxx_enable:-"NO"} >>before calling load_rc_config $name > > Again, why special-case ports scripts ? Because the defaults belong to the port, not to the base system. I want them to go away with the port. Nobody (and especially not ports) should edit whatever/defaults/rc.conf, and how would I otherwise cope with the situation that default flags may change? > If the only thing people want is an xxx_enable, then the current scheme > is fine: Install the port script with xxx.sh-sample and when you want > to enable it just rename the file. But if the ports want to be able to > use the whole range of rc.d functionality, then ${PREFIX}/etc/defaults/rc.conf > is needed for all the other knobs that need to be defined. I guess I incorporate ${PREFIX}/etc/defaults/rc.conf and another change in PR 56736, the main point there was that I wanted them to participate in rcorder, which I believe is a good thing, especially when you consider the possibility to move sendmail or other parts of the base system to ports. So I understand that sourcing ${PREFIX}/etc/defaults/rc.conf is the main reservation that you have against this patch? Regards Oliver