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

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