From owner-freebsd-rc@FreeBSD.ORG Tue Jun 7 00:14:59 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B2EEE16A41C; Tue, 7 Jun 2005 00:14:59 +0000 (GMT) (envelope-from jr@opal.com) Received: from smtp.vzavenue.net (smtp.vzavenue.net [66.171.59.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E96443D48; Tue, 7 Jun 2005 00:14:58 +0000 (GMT) (envelope-from jr@opal.com) Received: from linwhf.opal.com (112.79.171.66.subscriber.vzavenue.net [66.171.79.112]) by smtp.vzavenue.net (MOS 3.4.8-GR) with ESMTP id CIS14010; Mon, 6 Jun 2005 20:14:48 -0400 (EDT) Received: from ASSP-nospam (localhost [127.0.0.1]) by linwhf.opal.com (8.13.3/8.13.3) with ESMTP id j570EmDZ038741; Mon, 6 Jun 2005 20:14:48 -0400 (EDT) (envelope-from jr@opal.com) Received: from 127.0.0.1 ([127.0.0.1] helo=linwhf.opal.com) by ASSP-nospam ; 7 Jun 05 00:14:48 -0000 Received: (from jr@localhost) by linwhf.opal.com (8.13.3/8.13.3/Submit) id j570ElnI038740; Mon, 6 Jun 2005 20:14:47 -0400 (EDT) (envelope-from jr) Date: Mon, 6 Jun 2005 20:14:47 -0400 From: "J.R. Oldroyd" To: Brooks Davis Message-ID: <20050607001447.GG37208@linwhf.opal.com> References: <20050603143803.GP886@linwhf.opal.com> <42A4CA37.1050201@FreeBSD.org> <20050606235426.GA10526@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ibTvN161/egqYuK8" Content-Disposition: inline In-Reply-To: <20050606235426.GA10526@odin.ac.hmc.edu> User-Agent: Mutt/1.4.2.1i X-Junkmail-Status: score=0/50, host=smtp.vzavenue.net Cc: freebsd-rc@freebsd.org Subject: Re: Use of rcorder for local rc.d/*.sh scripts X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jun 2005 00:14:59 -0000 --ibTvN161/egqYuK8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Jun 06, 16:54, Brooks Davis wrote: >=20 > This isn't feasable in the general case with current infrastructure. > The problem is that you need to make it up to mountcritremote before you > have any assurance that /usr/local/etc exists. >=20 > Ports contains a work around that allows port to install script in > /etc/rc.d if they truly need to appear before localpkg. Such ports > generally still need to have scripts that run after mountcritlocal and > won't work on systems where /usr/local is remote unless it is on /. >=20 > From the perspective of someone who works on the diskless scripts, I > think that sorting scripts in localpkg and using this hack is a decent > comprimise. >=20 > Another note, this decision will need to be discussed with ports@ since > there are a lot of scripts in ${LOCALBASE}/rc.d. There's also at least > one binary (postfix). I'd like to see this change happen, but there are > a lot of issues to work out. >=20 The solution for that would be to: - rcorder the /etc/rc.d scripts - execute the scripts up to mountcritlocal and a dummy script that has a "PROVIDE: MOUNTCRITLOCAL" or similar - rerun rcorder on the complete script list (including the locals) - execute the list again, this time skipping over any in /etc/rc.d before the MOUNTCRITLOCAL is reached (since they were done before) I don't know if that's getting too complicated. I have to say I prefer to keep things simple. I also looked at /etc/rc.subr:run_rc_script and discovered that it handles "foo" and "foo.sh" differently. "foo", if executable, is run in a subshell, whereas "foo.sh" is sourced into the current shell. I suspect we don't want all the local rc foo.sh scripts sourcing into the /etc/rc shell. I.e., to make a change like this, all local rc scripts would need to be renamed as well as having rcorder tags added if not already there. I currently use the hack to localpkg which I originally suggested. I needed it because several existing ports fail to start without it and that change does fix the problem. -jr --ibTvN161/egqYuK8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iQDVAwUBQqTm90kkqUax7f6FAQK8oQX7BBy9iw9lbbb9wcHCasjBnPye1PlG+kqG K5T9FLpjvSDwXdKaTunk+ERNAcm0Y92K9ATGIVSZhXCBzBqFNErSGbbQOgsHNgLG 7/AAHl8H5XcNefqTKopH4r7vXhhACDMIdhMGbyMlrR1OAeSltfZi3x7XbkylXg8d rkFLQ6SGSYPP1kAdSiEL8h+KwN/CfDVn/Y/l4iaassOJSxxysJSB+b/rNzFk1Oav yhTHg2gnANhb+LC0FekE9X6C8RQe5GJ+ =KeLv -----END PGP SIGNATURE----- --ibTvN161/egqYuK8--