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