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

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