network: also wait for ethernet interfaces to setup
authorWANG Chao <chaowang@redhat.com>
Mon, 12 Aug 2013 08:43:52 +0000 (16:43 +0800)
committerHarald Hoyer <harald@redhat.com>
Wed, 14 Aug 2013 13:04:05 +0000 (15:04 +0200)
We only wait for master interfaces for bridge/bonding/team/vlan case.
If none of these complex network is configured, we should wait for
ethernet interface (bootdev) instead.

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

index f6b7d9a..31cd1e6 100755 (executable)
@@ -74,7 +74,13 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
         done
         echo 'LABEL="net_end"'
 
-        for iface in $MASTER_IFACES; do
+        if [ -n "$MASTER_IFACES" ]; then
+            wait_ifaces=$MASTER_IFACES
+        else
+            wait_ifaces=$IFACES
+        fi
+
+        for iface in $wait_ifaces; do
             if [ "$bootdev" = "$iface" ] || [ "$NEEDNET" = "1" ]; then
                 echo "[ -f /tmp/setup_net_${iface}.ok ]" >$hookdir/initqueue/finished/wait-$iface.sh
             fi