Ensuring ethernet is configured before continuing init scripts.
Posted
by
Pete Ashdown
on Ask Ubuntu
See other posts from Ask Ubuntu
or by Pete Ashdown
Published on 2011-06-27T19:03:42Z
Indexed on
2011/06/28
0:30 UTC
Read the original article
Hit count: 252
init
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
© Ask Ubuntu or respective owner