You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.0 KiB
33 lines
1.0 KiB
6 years ago
|
From a7805d1297645722b1522a48a5588e949e2f3c7c Mon Sep 17 00:00:00 2001
|
||
|
From: Harald Hoyer <harald@redhat.com>
|
||
|
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 9f767144..92154cc6 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
|