|
Harald Hoyer |
ab11ed |
From 0290e98271af41423e16801b959779c945ee4d59 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
ab11ed |
From: Baoquan He <bhe@redhat.com>
|
|
Harald Hoyer |
ab11ed |
Date: Mon, 8 Apr 2013 17:47:50 +0800
|
|
Harald Hoyer |
ab11ed |
Subject: [PATCH] Wait for logical interface to be up
|
|
Harald Hoyer |
ab11ed |
|
|
Harald Hoyer |
ab11ed |
If bootdev is logical interface like bond, bridge or vlan, we need
|
|
Harald Hoyer |
ab11ed |
wait them up.
|
|
Harald Hoyer |
ab11ed |
|
|
Harald Hoyer |
ab11ed |
Signed-off-by: Baoquan He <bhe@redhat.com>
|
|
Harald Hoyer |
ab11ed |
---
|
|
Harald Hoyer |
ab11ed |
modules.d/40network/net-genrules.sh | 9 +++++++++
|
|
Harald Hoyer |
ab11ed |
1 file changed, 9 insertions(+)
|
|
Harald Hoyer |
ab11ed |
|
|
Harald Hoyer |
ab11ed |
diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh
|
|
Harald Hoyer |
ab11ed |
index 05fa5f3..8bf6a89 100755
|
|
Harald Hoyer |
ab11ed |
--- a/modules.d/40network/net-genrules.sh
|
|
Harald Hoyer |
ab11ed |
+++ b/modules.d/40network/net-genrules.sh
|
|
Harald Hoyer |
ab11ed |
@@ -25,6 +25,7 @@ fi
|
|
Harald Hoyer |
ab11ed |
if [ -e /tmp/bridge.info ]; then
|
|
Harald Hoyer |
ab11ed |
. /tmp/bridge.info
|
|
Harald Hoyer |
ab11ed |
IFACES="$IFACES ${ethnames%% *}"
|
|
Harald Hoyer |
ab11ed |
+ MASTER_IFACES="$MASTER_IFACES $bridgename"
|
|
Harald Hoyer |
ab11ed |
fi
|
|
Harald Hoyer |
ab11ed |
|
|
Harald Hoyer |
ab11ed |
# bond: attempt only the defined interface (override bridge defines)
|
|
Harald Hoyer |
ab11ed |
@@ -35,16 +36,19 @@ fi
|
|
Harald Hoyer |
ab11ed |
. "$i"
|
|
Harald Hoyer |
ab11ed |
# It is enough to fire up only one
|
|
Harald Hoyer |
ab11ed |
IFACES="$IFACES ${bondslaves%% *}"
|
|
Harald Hoyer |
ab11ed |
+ MASTER_IFACES="$MASTER_IFACES ${bondname}"
|
|
Harald Hoyer |
ab11ed |
done
|
|
Harald Hoyer |
ab11ed |
|
|
Harald Hoyer |
ab11ed |
if [ -e /tmp/team.info ]; then
|
|
Harald Hoyer |
ab11ed |
. /tmp/team.info
|
|
Harald Hoyer |
ab11ed |
IFACES="$IFACES ${teamslaves}"
|
|
Harald Hoyer |
ab11ed |
+ MASTER_IFACES="$MASTER_IFACES ${teammaster}"
|
|
Harald Hoyer |
ab11ed |
fi
|
|
Harald Hoyer |
ab11ed |
|
|
Harald Hoyer |
ab11ed |
if [ -e /tmp/vlan.info ]; then
|
|
Harald Hoyer |
ab11ed |
. /tmp/vlan.info
|
|
Harald Hoyer |
ab11ed |
IFACES="$IFACES $phydevice"
|
|
Harald Hoyer |
ab11ed |
+ MASTER_IFACES="$MASTER_IFACES ${vlanname}"
|
|
Harald Hoyer |
ab11ed |
fi
|
|
Harald Hoyer |
ab11ed |
|
|
Harald Hoyer |
ab11ed |
if [ -z "$IFACES" ]; then
|
|
Harald Hoyer |
ab11ed |
@@ -74,6 +78,11 @@ fi
|
|
Harald Hoyer |
ab11ed |
fi
|
|
Harald Hoyer |
ab11ed |
done
|
|
Harald Hoyer |
ab11ed |
|
|
Harald Hoyer |
ab11ed |
+ for iface in $MASTER_IFACES; do
|
|
Harald Hoyer |
ab11ed |
+ if [ "$bootdev" = "$iface" ]; then
|
|
Harald Hoyer |
ab11ed |
+ echo "[ -f /tmp/setup_net_${iface}.ok ]" >$hookdir/initqueue/finished/wait-$iface.sh
|
|
Harald Hoyer |
ab11ed |
+ fi
|
|
Harald Hoyer |
ab11ed |
+ done
|
|
Harald Hoyer |
ab11ed |
# Default: We don't know the interface to use, handle all
|
|
Harald Hoyer |
ab11ed |
# Fixme: waiting for the interface as well.
|
|
Harald Hoyer |
ab11ed |
else
|