Ensuring ethernet is configured before continuing init scripts.
- by Pete Ashdown
Is there a better way to ensure that an ethernet port is configured before continuing through startup init scripts? When 802.3ad bonded ethernet is configured on Ubuntu, it takes some time before it finishes protocol negotiation and starts passing packets, because the networking script just configures, but does not verify that traffic is being passed. As a result, this can throw off some of the other network dependent scripts, like the init for drbd. Right now, I just have a loop that pings the gateway in a startup script, but this seems less than optimal:
GATEWAYIP=10.0.0.1
while ( ! ping -c 1 $GATEWAYIP ); do
echo gateway not up
done