]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
network/net-lib.sh: auto6 wait for route ra
authorHarald Hoyer <harald@redhat.com>
Thu, 30 Jun 2016 06:52:09 +0000 (08:52 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 30 Jun 2016 06:52:09 +0000 (08:52 +0200)
Wait for a router advertised route

modules.d/40network/net-lib.sh

index 98dbbb63f9e32568f9dc086a7cfd7f65d97fa8f5..b248133d2129bfcdce06064e77b1d4e05eb8606c 100755 (executable)
@@ -659,7 +659,9 @@ wait_for_ipv6_auto() {
     timeout=$(($timeout*10))
 
     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
         cnt=$(($cnt+1))
     done