Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Sep 2010 22:20:42 -0400
From:      Ed Maste <emaste@freebsd.org>
To:        Brooks Davis <brooks@freebsd.org>
Cc:        freebsd-rc@freebsd.org
Subject:   Re: Wait for carrier in /etc/rc.d/defaultroute
Message-ID:  <20100928022042.GA92385@sandvine.com>
In-Reply-To: <20100925183105.GI72897@lor.one-eyed-alien.net>
References:  <20100925000435.GA62501@sandvine.com> <20100925183105.GI72897@lor.one-eyed-alien.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Sep 25, 2010 at 01:31:05PM -0500, Brooks Davis wrote:

> On Fri, Sep 24, 2010 at 08:04:35PM -0400, Ed Maste wrote:
>
> > 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.
> 
> This seems like a reasionable solution.  Just checking for carrier
> didn't work as well as I'd hoped.  Have you tested this on a bridge or
> similar interface?

No, I've tested only on physical interfaces.  The logic for detecting
carrier is unchanged from what was there though, so I wouldn't expect
any significant change.

> It seems like in some senses there's probably something more the nic
> could be telling us about it's state so we could do a better job here.
> What we really want to know is if we have any dhcp interfaces that have
> a chance of getting a lease any time soon so if the interface could say "I think I've got a
> cable attached" that would be useful.

I agree, but that's not a project I'm ready to take on at the moment :)

I wonder how (if) other operating systems handle this.

-Ed



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100928022042.GA92385>