network/net-lib.sh: auto6 wait for route ra
Wait for a router advertised route
parent
bac74f05e3
commit
6d22a6860e
|
@ -659,7 +659,9 @@ wait_for_ipv6_auto() {
|
||||||
timeout=$(($timeout*10))
|
timeout=$(($timeout*10))
|
||||||
|
|
||||||
while [ $cnt -lt $timeout ]; do
|
while [ $cnt -lt $timeout ]; do
|
||||||
[ -z "$(ip -6 addr show dev $1 scope global tentative)" ] && return 0
|
[ -z "$(ip -6 addr show dev "$1" scope global tentative)" ] \
|
||||||
|
&& [ -n "$(ip -6 route list proto ra dev "$1")" ] \
|
||||||
|
&& return 0
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
cnt=$(($cnt+1))
|
cnt=$(($cnt+1))
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue