Date: Fri, 29 Apr 2011 11:22:17 -0700 From: Doug Barton <dougb@FreeBSD.org> To: Ryan Stone <rysto32@gmail.com> 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: <4DBB01D9.2060805@FreeBSD.org> In-Reply-To: <BANLkTi=FH4DeB-bH9Dcre_U-5J%2BP%2B3o_BA@mail.gmail.com> References: <BANLkTi=FH4DeB-bH9Dcre_U-5J%2BP%2B3o_BA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[ some snipping of things we all agree on ] On 04/29/2011 08:29, Ryan Stone wrote: > The only day I ran into an issue where certain rc.d scripts were being > skipped during boot. I investigated it and the problem was that when > rc went to execute the early rc.d scripts, rcorder placed the missed > scripts after the early-late divider. However when rcorder was run > the second time the missed scripts were placed before the early-late > divider. Because of this, rc skipped over those scripts incorrectly. Yes, that can happen, sorry that it bit you. > Ultimately, the problem is that we don't have a total ordering over > the rc.d scripts. You're right, but unfortunately it's not possible to do with the mandate of supporting diskless boot, and /usr/local on a different (perhaps remote) partition. > Below I have a patch that fixes the issue for me. Your idea is good, but not how I would do it. Keeping a list of files that have already run and then using case to determine if a file is in the list is both faster, and (IMO) easier to read. You can see an example at the end of /etc/defaults/rc.conf. I originally had it in mind to do this, but the situation you described happened so seldom, and was always a result of some other error in the ordering. (Usually something that wasn't local trying to run too early.) However, since there seems to be agreement that this is a step worth taking now, I'll work on it today and post the patch in a bit. Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DBB01D9.2060805>