]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Wait for logical interface to be up
authorBaoquan He <bhe@redhat.com>
Mon, 8 Apr 2013 09:47:50 +0000 (17:47 +0800)
committerHarald Hoyer <harald@redhat.com>
Tue, 9 Apr 2013 08:53:08 +0000 (10:53 +0200)
If bootdev is logical interface like bond, bridge or vlan, we need
wait them up.

Signed-off-by: Baoquan He <bhe@redhat.com>
modules.d/40network/net-genrules.sh

index 05fa5f3bf4b15835226dac6b992968810520e0fd..8bf6a89f917f4e95356ad16a53dc601be0ab3fba 100755 (executable)
@@ -25,6 +25,7 @@ fi
     if [ -e /tmp/bridge.info ]; then
         . /tmp/bridge.info
         IFACES="$IFACES ${ethnames%% *}"
+        MASTER_IFACES="$MASTER_IFACES $bridgename"
     fi
 
     # bond: attempt only the defined interface (override bridge defines)
@@ -35,16 +36,19 @@ fi
         . "$i"
         # It is enough to fire up only one
         IFACES="$IFACES ${bondslaves%% *}"
+        MASTER_IFACES="$MASTER_IFACES ${bondname}"
     done
 
     if [ -e /tmp/team.info ]; then
         . /tmp/team.info
         IFACES="$IFACES ${teamslaves}"
+        MASTER_IFACES="$MASTER_IFACES ${teammaster}"
     fi
 
     if [ -e /tmp/vlan.info ]; then
         . /tmp/vlan.info
         IFACES="$IFACES $phydevice"
+        MASTER_IFACES="$MASTER_IFACES ${vlanname}"
     fi
 
     if [ -z "$IFACES" ]; then
@@ -74,6 +78,11 @@ fi
             fi
         done
 
+        for iface in $MASTER_IFACES; do
+            if [ "$bootdev" = "$iface" ]; then
+                echo "[ -f /tmp/setup_net_${iface}.ok ]" >$hookdir/initqueue/finished/wait-$iface.sh
+            fi
+        done
     # Default: We don't know the interface to use, handle all
     # Fixme: waiting for the interface as well.
     else