Date: Tue, 7 Jun 2005 10:37:41 -0700 From: Brooks Davis <brooks@one-eyed-alien.net> To: "J.R. Oldroyd" <fbsd@opal.com> Cc: freebsd-rc@freebsd.org Subject: Re: Use of rcorder for local rc.d/*.sh scripts Message-ID: <20050607173741.GI11758@odin.ac.hmc.edu> In-Reply-To: <20050607160855.GO37208@linwhf.opal.com> References: <20050603143803.GP886@linwhf.opal.com> <42A4CA37.1050201@FreeBSD.org> <20050606235426.GA10526@odin.ac.hmc.edu> <20050607001447.GG37208@linwhf.opal.com> <20050607003142.GD10526@odin.ac.hmc.edu> <20050607033536.GH37208@linwhf.opal.com> <20050607160855.GO37208@linwhf.opal.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--7SrMUQONj8Rl9QNG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 07, 2005 at 12:08:55PM -0400, J.R. Oldroyd wrote: > Having slept on this, I am in two minds as to which approach is > better: hacking localpkg or fixing /etc/rc to handle everything > in all startup dirs. >=20 > I do think that the use of a single rc script to run all rc files > is probably the proper approach, even though moving to this from > where we are now will require more changes. >=20 > So, I offer the following solution as an alternative to the hack > to localpkg. Below I: > - add /etc/rc.d/MOUNTDONE > a dummy script to flag the point in the list > when we've completed the fs mounts > - patches to /etc/rc > to run the files list in two passes, once > for the files in /etc/rc.d up to the MOUNTDONE > point, and then a second time with the files > in the local startup dirs included, this time > skipping files in /etc/rc.d prior to the > MOUNTDONE point This part looks like it's probably a feasible solution, though I'm not fully convinced of its value relative to the complexity it adds. > In this version, I have removed the code that required local startup > scripts to be named *.sh since rc.subr's run_rc_script function > handles *.sh specially. So, if this approach were adopted, several > changes will be needed to all local rc scripts: > - any with a .sh suffix will need to be renamed from > "foo.sh" to "foo" > - any files like "*.sh.sample" will have to be moved > elsewhere, or made non-executable > - rcorder tags will need to be added to any that care > about the order of their execution, and names like > "000.*" can be eliminated There is very little chance of getting this to fly. Remember, any solution has to work for all releases currently supported by ports. In practice, this currently means the security branches so anything that breaks existing localpkg based systems is not going to work. I think that keeping the .sh extension is going to be required for the foreseeable future. Requiring that rcorder runs on all the .sh files generate an appropriate order is probably a reasonable goal for 6.0. If we did that in 6.0, we could require the removal of non .sh files for 7.0 and remove the .sh extensions through a release dependent action in the RC_SUBR support in bsd.port.mk. In theory you could do the RC_SUBR changes for 6.0, but big changes to requirements for ports are very time consuming, especially if you are going to modify bsd.port.mk. Any change of this order is going to require discussion on ports, and buy-in from portmgr. -- 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 --7SrMUQONj8Rl9QNG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFCpdtjXY6L6fI4GtQRAuC/AJ96C6BF2iY0QvLJCdg0jYKOtfExvQCeIfOQ 29LiUTtbLKtKdINOWPGn5IU= =CxVf -----END PGP SIGNATURE----- --7SrMUQONj8Rl9QNG--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050607173741.GI11758>