From owner-freebsd-rc@FreeBSD.ORG Fri Apr 29 19:48:17 2011 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3D9E1065672; Fri, 29 Apr 2011 19:48:17 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 579F08FC0C; Fri, 29 Apr 2011 19:48:16 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.4/8.14.4) with ESMTP id p3TCenkx080624; Fri, 29 Apr 2011 07:40:49 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.4/8.14.4/Submit) id p3TCenCF080623; Fri, 29 Apr 2011 07:40:49 -0500 (CDT) (envelope-from brooks) Date: Fri, 29 Apr 2011 07:40:49 -0500 From: Brooks Davis To: Doug Barton Message-ID: <20110429124049.GB79653@lor.one-eyed-alien.net> References: <4DBB01D9.2060805@FreeBSD.org> <4DBB09FA.1040108@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oLBj+sq0vYjzfsbl" Content-Disposition: inline In-Reply-To: <4DBB09FA.1040108@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (lor.one-eyed-alien.net [127.0.0.1]); Fri, 29 Apr 2011 07:40:50 -0500 (CDT) 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 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: Fri, 29 Apr 2011 19:48:17 -0000 --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--