Date: Fri, 29 Apr 2011 07:40:49 -0500 From: Brooks Davis <brooks@freebsd.org> To: Doug Barton <dougb@freebsd.org> Cc: freebsd-rc@freebsd.org Subject: Re: rc.d scripts can be missed if they aren't ordered with respect to the early-late divider Message-ID: <20110429124049.GB79653@lor.one-eyed-alien.net> In-Reply-To: <4DBB09FA.1040108@FreeBSD.org> References: <BANLkTi=FH4DeB-bH9Dcre_U-5J%2BP%2B3o_BA@mail.gmail.com> <4DBB01D9.2060805@FreeBSD.org> <4DBB09FA.1040108@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--oLBj+sq0vYjzfsbl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 29, 2011 at 11:56:58AM -0700, Doug Barton wrote: > The attached patch works, is probably cleaner than the existing code,=20 > and since the list of things run early is small is certainly no slower=20 > than the existing code. Using a space-separated list also has the=20 > advantage of not being limited to the format of filenames that it support= s. Looks good to me. I'll admit I find ':' separators more unixy, but it truly doesn't matter. -- Brooks > I'll commit it later today unless I get an objection. >=20 > --=20 >=20 > Nothin' ever doesn't change, but nothin' changes much. > -- OK Go >=20 > Breadth of IT experience, and depth of knowledge in the DNS. > Yours for the right price. :) http://SupersetSolutions.com/ >=20 > Index: rc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- rc (revision 221216) > +++ rc (working copy) > @@ -84,8 +84,10 @@ > # > files=3D`rcorder ${skip} /etc/rc.d/* 2>/dev/null` > =20 > +_rc_elem_done=3D' ' > for _rc_elem in ${files}; do > run_rc_script ${_rc_elem} ${_boot} > + _rc_elem_done=3D"${_rc_elem_done}${_rc_elem} " > =20 > case "$_rc_elem" in > */${early_late_divider}) break ;; > @@ -103,14 +105,9 @@ > esac > =20 > files=3D`rcorder ${skip} /etc/rc.d/* ${local_rc} 2>/dev/null` > -_skip_early=3D1 > for _rc_elem in ${files}; do > - case "$_skip_early" in > - 1) case "$_rc_elem" in > - */${early_late_divider}) _skip_early=3D0 ;; > - esac > - continue > - ;; > + case "$_rc_elem_done" in > + *" $_rc_elem "*) continue ;; > esac > =20 > run_rc_script ${_rc_elem} ${_boot} > _______________________________________________ > freebsd-rc@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-rc > To unsubscribe, send any mail to "freebsd-rc-unsubscribe@freebsd.org" --oLBj+sq0vYjzfsbl Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFNurHRXY6L6fI4GtQRAtF9AKDFwgPCj3pqBEaVGrXJPhu94BcsSwCeKNYD IIvAWc7jOshqf5GvpFxFttI= =CYDN -----END PGP SIGNATURE----- --oLBj+sq0vYjzfsbl--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110429124049.GB79653>