From owner-freebsd-arch@FreeBSD.ORG Mon Feb 23 23:24:39 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 DB8BD16A4CE for ; Mon, 23 Feb 2004 23:24:39 -0800 (PST) Received: from telecom.net.et (sparrow.telecom.net.et [213.55.64.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA42143D1F for ; Mon, 23 Feb 2004 23:24:35 -0800 (PST) (envelope-from mtm@identd.net) Received: from [213.55.67.126] (HELO pool-151-200-10-97.res.east.verizon.net) by telecom.net.et (CommuniGate Pro SMTP 3.4.8) with ESMTP-TLS id 37426633; Tue, 24 Feb 2004 10:18:42 +0300 Received: from mobile.acs-et.com (localhost [127.0.0.1]) ESMTP id i1O7OCQk001331; Tue, 24 Feb 2004 10:24:16 +0300 (EAT) (envelope-from mtm@mobile.acs-et.com) Received: (from mtm@localhost) by mobile.acs-et.com (8.12.10/8.12.10/Submit) id i1O7OBfA001330; Tue, 24 Feb 2004 10:24:11 +0300 (EAT) (envelope-from mtm) Date: Tue, 24 Feb 2004 10:24:01 +0300 From: Mike Makonnen To: Oliver Eikemeier Message-ID: <20040224072401.GB1125@mobile.acs-et.com> References: <20040223084146.GA4202@mobile.acs-et.com> <4039D9FF.40208@fillmore-labs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4039D9FF.40208@fillmore-labs.com> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD/5.2-CURRENT (i386) 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 07:24:40 -0000 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. > > > >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 ? 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. Cheers. -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc mtm@identd.net | Fingerprint: AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55 mtm@FreeBSD.Org| FreeBSD - Unleash the Daemon !