From owner-freebsd-rc@FreeBSD.ORG Tue Sep 28 03:23:51 2010 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 4D9F4106564A for ; Tue, 28 Sep 2010 03:23:51 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id EA92E8FC15 for ; Tue, 28 Sep 2010 03:23:50 +0000 (UTC) Received: (qmail 13055 invoked by uid 399); 28 Sep 2010 03:23:49 -0000 Received: from localhost (HELO ?192.168.0.142?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 28 Sep 2010 03:23:49 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4CA15FC8.8010106@FreeBSD.org> Date: Mon, 27 Sep 2010 20:23:52 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 MIME-Version: 1.0 To: freebsd-rc@freebsd.org References: <20100925000435.GA62501@sandvine.com> In-Reply-To: <20100925000435.GA62501@sandvine.com> X-Enigmail-Version: 1.2a1pre OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Jeremy Chadwick Subject: Re: Wait for carrier in /etc/rc.d/defaultroute 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: Tue, 28 Sep 2010 03:23:51 -0000 On 9/24/2010 5:04 PM, Ed Maste wrote: > /etc/rc.d/defaultroute currently bails immediately if all interfaces > set to use DHCP have no carrier. This caused grief at work as it takes > some time for link to be established, and defaultroute ran before this > happened. The rest of rc.d/ ran then before DHCP could assign an > address and route. > > The attached patch introduces a defaultroute_carrier_delay variable > and a change to /etc/rc.d/defaultroute to wait that long before bailing > out if there are no interfaces with carrier. With the default settings > defaultroute will wait for five seconds to see if any interface gets > carrier. The original 30 second wait for a default route to appear is > unchanged. > > Any comments? I'll commit it sometime next week if there's no concern. There was a more generic solution floating around fairly recently, from Jeremy Chadwick. The thread on this list starts back in april, but the latest version of the script appeared in june, so you might want to start there. I used versions of that script for most of this calendar year, and offered to commit it if the rc.conf.5 update was written. Jeremy, if you've done that bit and I lost track, apologies, my FreeBSD time has been super limited lately, but it's on the upswing at the moment, so maybe you could update us? Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/