From owner-freebsd-ports@FreeBSD.ORG Tue Mar 28 19:07:55 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 ABA0816A400 for ; Tue, 28 Mar 2006 19:07:55 +0000 (UTC) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5306243D55 for ; Tue, 28 Mar 2006 19:07:55 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id k2SJ7st0004142; Tue, 28 Mar 2006 11:07:54 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id k2SJ7s0f004141; Tue, 28 Mar 2006 11:07:54 -0800 Date: Tue, 28 Mar 2006 11:07:54 -0800 From: Brooks Davis To: "[LoN]Kamikaze" Message-ID: <20060328190754.GC16561@odin.ac.hmc.edu> References: <442981B8.4010605@gmx.de> <20060328184452.GB16561@odin.ac.hmc.edu> <44298769.1020405@gmx.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JWEK1jqKZ6MHAcjA" Content-Disposition: inline In-Reply-To: <44298769.1020405@gmx.de> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: Brooks Davis , 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 19:07:55 -0000 --JWEK1jqKZ6MHAcjA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. > >=20 > > 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 event= ually > > remove the special case (should there be any point.) > >=20 > > -- Brooks > >=20 >=20 > 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 doin= g. 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 --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --JWEK1jqKZ6MHAcjA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFEKYmJXY6L6fI4GtQRAk9KAKC8qqvr8WhzYN4J8pFYqWJJHpOVvQCfezoG lH0jHOz3OKlNDh8Y9cdjwEo= =3DrE -----END PGP SIGNATURE----- --JWEK1jqKZ6MHAcjA--