Blame SOURCES/0047-network-net-lib.sh-wait_for_if_up-wait-for-state-UP.patch

18971c
From 243b8e14a2cdd317717ad8db5bb82aae9a8d7d14 Mon Sep 17 00:00:00 2001
18971c
From: Harald Hoyer <harald@redhat.com>
18971c
Date: Mon, 2 Dec 2013 10:34:18 +0100
18971c
Subject: [PATCH] network/net-lib.sh:wait_for_if_up() wait for "state UP"
18971c
18971c
really wait for "state UP", otherwise it returns earlier than we want
18971c
---
18971c
 modules.d/40network/net-lib.sh | 2 +-
18971c
 1 file changed, 1 insertion(+), 1 deletion(-)
18971c
18971c
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
18971c
index 88e72ece..0aa312a0 100644
18971c
--- a/modules.d/40network/net-lib.sh
18971c
+++ b/modules.d/40network/net-lib.sh
18971c
@@ -443,7 +443,7 @@ wait_for_if_up() {
18971c
     local li
18971c
     while [ $cnt -lt 200 ]; do
18971c
         li=$(ip -o link show up dev $1)
18971c
-        [ -n "$li" ] && return 0
18971c
+        [ -n "$li" ] && [ -z "${li##*state UP*}" ] && return 0
18971c
         sleep 0.1
18971c
         cnt=$(($cnt+1))
18971c
     done