Blame SOURCES/0413-network-net-lib.sh-wait_for_ipv6_dad-simplify-ip-cal.patch

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