712866
From a7805d1297645722b1522a48a5588e949e2f3c7c Mon Sep 17 00:00:00 2001
712866
From: Harald Hoyer <harald@redhat.com>
712866
Date: Wed, 29 Jun 2016 17:18:46 +0200
712866
Subject: [PATCH] network/net-lib.sh(wait_for_ipv6_dad): simplify ip call
712866
712866
taken from initscripts
712866
---
712866
 modules.d/40network/net-lib.sh | 6 +-----
712866
 1 file changed, 1 insertion(+), 5 deletions(-)
712866
712866
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
5c6c2a
index 9f767144..92154cc6 100755
712866
--- a/modules.d/40network/net-lib.sh
712866
+++ b/modules.d/40network/net-lib.sh
712866
@@ -624,16 +624,12 @@ wait_for_ipv6_dad() {
712866
 
712866
 wait_for_ipv6_auto() {
712866
     local cnt=0
712866
-    local li
712866
     local timeout="$(getargs rd.net.timeout.ipv6auto=)"
712866
     timeout=${timeout:-40}
712866
     timeout=$(($timeout*10))
712866
 
712866
     while [ $cnt -lt $timeout ]; do
712866
-        li=$(ip -6 addr show dev $1)
712866
-        if ! strstr "$li" "tentative"; then
712866
-            strstr "$li" "dynamic" && return 0
712866
-        fi
712866
+        [ -z "$(ip -6 addr show dev $1 scope global tentative)" ] && return 0
712866
         sleep 0.1
712866
         cnt=$(($cnt+1))
712866
     done