Date: Mon, 28 Feb 2005 07:57:23 -0800 From: Brooks Davis <brooks@one-eyed-alien.net> To: Mike Makonnen <mtm@identd.net> Cc: rc@freebsd.org Subject: Re: proposal: etc/rc.d/initdiskless -> /etc/rc.initdiskless Message-ID: <20050228155723.GA17939@odin.ac.hmc.edu> In-Reply-To: <20050227131203.GA3172@rogue.smit.lan> References: <20050224221257.GA655@odin.ac.hmc.edu> <20050227131203.GA3172@rogue.smit.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
--WIyZ46R2i8wDzkSu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 27, 2005 at 04:12:03PM +0300, Mike Makonnen wrote: > On Thu, Feb 24, 2005 at 02:12:57PM -0800, Brooks Davis wrote: > > I would like to propose that we move the initdiskless script out of rc.d > > and back into /etc. The reason for doing this is that initdiskless is > > really about bootstrapping /etc from a minimial configuration. Thus > > running it via rcorder is really running it too early.=20 > ^^^^^^^^^ > I think you mean too late, right? Err, yes. :-) > > By moving it to > > /etc and running it directly from /etc/rc (possiably conditionally based > > on the existance of /conf) we fix this issue. The main benefit of this > > is that /etc/rc.d can now be modified or created entierly from entries > > under /conf which could make it easier to maintain extra scripts in the > > main flow of rc.d. > >=20 > > The change to /etc/rc would look something like: > >=20 > > diff -u -p -r1.335 rc > > --- rc 8 Oct 2004 14:23:49 -0000 1.335 > > +++ rc 24 Feb 2005 21:02:18 -0000 > > @@ -50,6 +50,10 @@ HOME=3D/ > > PATH=3D/sbin:/bin:/usr/sbin:/usr/bin > > export HOME PATH > > =20 > > +if [ -d /conf ]; then > > + /etc/rc.initdiskless > > +fi > > + >=20 > This is too generic. Isn't there some way of definitely knowing > whether this is a diskless boot? Looking at initdiskless again, this check is unnecessicary because the first code in initdiskless is: dlv=3D`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null` [ ${dlv:=3D0} -eq 0 ] && [ ! -f /etc/diskless ] && exit 0 There might be an argument for moving that test back in to /etc/rc to avoid including the file at all in the normal case and to make it entierly clear that initdiskless will not be run unless the syscall is set or /etc/diskless exists. > > . /etc/rc.subr > > =20 > > # Note: the system configuration files are loaded as part of > >=20 > >=20 > > Does anyone have major objections to this change? The goal is to run > > initdiskless as early as possible so /etc can be as minimal as possible > > at that point. >=20 > Sounds ok to me. Great. -- 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 --WIyZ46R2i8wDzkSu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFCIz9iXY6L6fI4GtQRAj3PAKC70pY091DZ8qrl1rlWbwRXJkdbSwCeMGaP GnQA1MvFzNVheRmbYejgHO4= =wo14 -----END PGP SIGNATURE----- --WIyZ46R2i8wDzkSu--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050228155723.GA17939>