rc.d scripts can be missed if they aren't ordered with respect
to the early-late divider
Doug Barton
dougb at FreeBSD.org
Fri Apr 29 18:22:19 UTC 2011
[ 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/
More information about the freebsd-rc
mailing list