From owner-freebsd-rc@FreeBSD.ORG Fri Apr 29 18:22:19 2011 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 958A7106566C for ; Fri, 29 Apr 2011 18:22:19 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 65-241-43-5.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id BC39114DCD6; Fri, 29 Apr 2011 18:22:18 +0000 (UTC) Message-ID: <4DBB01D9.2060805@FreeBSD.org> Date: Fri, 29 Apr 2011 11:22:17 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 MIME-Version: 1.0 To: Ryan Stone References: In-Reply-To: X-Enigmail-Version: 1.1.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 18:22:19 -0000 [ 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/