Re: BNX2 driver needs to block during boot
On Thu, May 01, 2008 at 04:42:36PM -0700, Mike Ely wrote:
> I've got a newish X-series server running Etch that has a Broadcom NIC
> using the BNX2 driver, all set up statically in interfaces (and I've
> commented out the "allow-hotplug" line for that interface).
> What I really need is for the networking subsystem to block rather
> than background until the NIC is fully alive. I'd rather not resort
> to some "until ping" kind of kludge, or the kludge I've currently
> stubbed off with, where I do a "wait 60" on the next service that
> depends on a live NIC, but would prefer to simply have networking wait
> for full comms to be established before passing control on to the next
> service startup. Given how long it takes an X-Series just to boot out
> of BIOS, a few extra seconds waiting for networking to be established
> really doesn't matter - but ISCSI missing its mounts surely does!
In /etc/networking/ifupdown, there's a field marked that it is not
currently used, to do this (I think). However, it's not used.
I would suggest either create an initscript that simply waits (as I
think you've done), or a smarter script that parses the output of
ifconfig to check that the interfaces are up. Since /sbin/ifconfig with
not parameters only displays status of interfaces that are active, a
simple grep for whatever eth it is (e.g. eth0) in some sort of while
loop with a 5 second sleep should do the trick.
I don't see that /sbin/ifconfig (which I think the initscripts use to
bring up the interface) has a blocking action, so any future debian
feature in the initscripts would likely be simply a polling loop anyway.
May as well do it yourself. If at a later time this feature is added,
your script will imediatly find the interface up and not hold up the