]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
network/net-lib.sh:wait_for_if_up() wait for "state UP"
authorHarald Hoyer <harald@redhat.com>
Mon, 2 Dec 2013 09:34:18 +0000 (10:34 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 3 Dec 2013 15:21:04 +0000 (16:21 +0100)
really wait for "state UP", otherwise it returns earlier than we want

modules.d/40network/net-lib.sh

index 88e72ece928954492a8d5bf1d97921ebc67b4df0..0aa312a093fe3b56116ef98743a2d481b896af85 100644 (file)
@@ -443,7 +443,7 @@ wait_for_if_up() {
     local li
     while [ $cnt -lt 200 ]; do
         li=$(ip -o link show up dev $1)
-        [ -n "$li" ] && return 0
+        [ -n "$li" ] && [ -z "${li##*state UP*}" ] && return 0
         sleep 0.1
         cnt=$(($cnt+1))
     done