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