From owner-freebsd-ports@FreeBSD.ORG Tue Mar 28 21:54:35 2006 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A12816A422 for ; Tue, 28 Mar 2006 21:54:35 +0000 (UTC) (envelope-from LoN_Kamikaze@gmx.de) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 53CD843D76 for ; Tue, 28 Mar 2006 21:54:32 +0000 (GMT) (envelope-from LoN_Kamikaze@gmx.de) Received: (qmail invoked by alias); 28 Mar 2006 21:54:31 -0000 Received: from cable194106210-142.astral.lodz.pl (EHLO [192.168.0.207]) [194.106.210.142] by mail.gmx.net (mp005) with SMTP; 28 Mar 2006 23:54:31 +0200 X-Authenticated: #5465401 Message-ID: <4429B095.4030802@gmx.de> Date: Tue, 28 Mar 2006 23:54:29 +0200 From: "[LoN]Kamikaze" Organization: Lords of Nightmare User-Agent: Thunderbird 1.5 (X11/20060128) MIME-Version: 1.0 To: Brooks Davis References: <442981B8.4010605@gmx.de> <20060328184452.GB16561@odin.ac.hmc.edu> <44298769.1020405@gmx.de> <20060328190754.GC16561@odin.ac.hmc.edu> In-Reply-To: <20060328190754.GC16561@odin.ac.hmc.edu> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: freebsd-ports@freebsd.org Subject: Re: databases/postgresql81-server - dangerous init script X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2006 21:54:35 -0000 Brooks Davis wrote: > On Tue, Mar 28, 2006 at 08:58:49PM +0200, [LoN]Kamikaze wrote: >> Brooks Davis wrote: >>> On Tue, Mar 28, 2006 at 08:34:32PM +0200, [LoN]Kamikaze wrote: >>>> The rc.d script for this port contains a new style script, but follows >>>> the old naming conventions, which will cause it to be executed directly >>>> sourced into the boot shell, which is an unnecessary risk, since it >>>> means that booting will fail if the script exits. >>> Actually, in this case, the manpage is wrong. Only scripts in /etc/rc.d >>> that end in .sh not all scripts ending in .sh are sourced. That said, >>> ports should be fixed to install without the .sh suffix so we can eventually >>> remove the special case (should there be any point.) >>> >>> -- Brooks >>> >> Well, that's what you get when you trust a manpage (somehow that makes >> me remember the UNIX Haters Handbook). >> That leads to the question what sourcing a script into the boot shell >> gains us that makes it worth the risk? > > It's of limited use. We initially used it for sourcing rc.conf > vi /etc/rc.d/rcconf.sh and for supporting /etc/rc.early via > /etc/rc.d/early.sh. The rc.conf stuff is now in /etc/rc and I think we > should just kill off /etc/rc.early support since it's basicly pointless > (just drop the script in /etc/rc.d with the right variables). > >> Triggering it by a naming convention also looks like a leftover from the >> old system. Doing this with a KEYWORD would seem more consistent to me >> and increase the probability that the script author knew what he was doing. > > Doing it with .sh is what lukem (of NetBSD) designed and we've stuck > with it. If anything, I'd be inclined to get rid of the feature rather > than change it. Triggering with a keyword would add a lot of code and > overhead to rc.subr. > > -- Brooks > I'd like to see developers not only document the features of their software, but also what the feature is good for. Especially in such cases where this is not obvious. Has anyone ever asked lukem of NetBSD what it is good for?