Date: Mon, 6 Jun 2005 20:14:47 -0400 From: "J.R. Oldroyd" <fbsd@opal.com> To: Brooks Davis <brooks@one-eyed-alien.net> Cc: freebsd-rc@freebsd.org Subject: Re: Use of rcorder for local rc.d/*.sh scripts Message-ID: <20050607001447.GG37208@linwhf.opal.com> In-Reply-To: <20050606235426.GA10526@odin.ac.hmc.edu> References: <20050603143803.GP886@linwhf.opal.com> <42A4CA37.1050201@FreeBSD.org> <20050606235426.GA10526@odin.ac.hmc.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050607001447.GG37208>