Timeout for ipv6 addresses being tentative.

This commit is contained in:
Roy Marples 2009-09-04 13:23:35 +01:00
parent 7012630302
commit 807e5d7250

View File

@ -225,6 +225,8 @@ _iproute2_ipv6_tentative()
iproute2_post_start() iproute2_post_start()
{ {
local n=5
# Kernel may not have IP built in # Kernel may not have IP built in
if [ -e /proc/net/route ]; then if [ -e /proc/net/route ]; then
ip route flush table cache dev "${IFACE}" ip route flush table cache dev "${IFACE}"
@ -232,11 +234,16 @@ iproute2_post_start()
if _iproute2_ipv6_tentative; then if _iproute2_ipv6_tentative; then
ebegin "Waiting for IPv6 addresses" ebegin "Waiting for IPv6 addresses"
while true; do while [ $n -ge 0 ]; do
_iproute2_ipv6_tentative || break _iproute2_ipv6_tentative || break
sleep 1
n=$(($n - 1))
done done
eend 0 [ $n -ge 0 ]
eend $?
fi fi
return 0
} }
iproute2_post_stop() iproute2_post_stop()