|
|
712866 |
From e6ae0c61285a7ff2a5be88b276b8d0b309e0ba2e Mon Sep 17 00:00:00 2001
|
|
|
712866 |
From: Harald Hoyer <harald@redhat.com>
|
|
|
712866 |
Date: Fri, 10 Jun 2016 14:32:48 +0200
|
|
|
712866 |
Subject: [PATCH] network/net-genrules.sh: generate rules for all interfaces
|
|
|
712866 |
|
|
|
712866 |
previously, if "rd.neednet" and bond was specified, only the bond
|
|
|
712866 |
interface was configured.
|
|
|
712866 |
|
|
|
712866 |
https://bugzilla.redhat.com/show_bug.cgi?id=1282680
|
|
|
712866 |
---
|
|
|
712866 |
modules.d/40network/net-genrules.sh | 22 +++++++++-------------
|
|
|
712866 |
1 file changed, 9 insertions(+), 13 deletions(-)
|
|
|
712866 |
|
|
|
712866 |
diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh
|
|
|
5c6c2a |
index 750a4d7f..526dd5cf 100755
|
|
|
712866 |
--- a/modules.d/40network/net-genrules.sh
|
|
|
712866 |
+++ b/modules.d/40network/net-genrules.sh
|
|
|
712866 |
@@ -16,7 +16,7 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
|
|
|
712866 |
# bridge: attempt only the defined interface
|
|
|
712866 |
if [ -e /tmp/bridge.info ]; then
|
|
|
712866 |
. /tmp/bridge.info
|
|
|
712866 |
- IFACES="$IFACES ${bridgeslaves%% *}"
|
|
|
712866 |
+ RAW_IFACES="$RAW_IFACES $bridgeslaves"
|
|
|
712866 |
MASTER_IFACES="$MASTER_IFACES $bridgename"
|
|
|
712866 |
fi
|
|
|
712866 |
|
|
|
712866 |
@@ -27,7 +27,7 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
|
|
|
712866 |
unset bondname
|
|
|
712866 |
. "$i"
|
|
|
712866 |
# It is enough to fire up only one
|
|
|
712866 |
- IFACES="$IFACES ${bondslaves%% *}"
|
|
|
712866 |
+ RAW_IFACES="$RAW_IFACES $bondslaves"
|
|
|
712866 |
MASTER_IFACES="$MASTER_IFACES ${bondname}"
|
|
|
712866 |
done
|
|
|
712866 |
|
|
|
712866 |
@@ -36,15 +36,17 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
|
|
|
712866 |
unset teamslaves
|
|
|
712866 |
unset teammaster
|
|
|
712866 |
. "$i"
|
|
|
712866 |
- IFACES="$IFACES ${teamslaves}"
|
|
|
712866 |
+ RAW_IFACES="$RAW_IFACES ${teamslaves}"
|
|
|
712866 |
MASTER_IFACES="$MASTER_IFACES ${teammaster}"
|
|
|
712866 |
done
|
|
|
712866 |
|
|
|
712866 |
if [ -e /tmp/vlan.info ]; then
|
|
|
712866 |
. /tmp/vlan.info
|
|
|
712866 |
- IFACES="$IFACES $phydevice"
|
|
|
712866 |
+ RAW_IFACES="$RAW_IFACES $phydevice"
|
|
|
712866 |
MASTER_IFACES="$MASTER_IFACES ${vlanname}"
|
|
|
712866 |
fi
|
|
|
712866 |
+ MASTER_IFACES="$(trim "$MASTER_IFACES")"
|
|
|
712866 |
+ RAW_IFACES="$(trim "$RAW_IFACES")"
|
|
|
712866 |
|
|
|
712866 |
if [ -z "$IFACES" ]; then
|
|
|
712866 |
[ -e /tmp/net.ifaces ] && read IFACES < /tmp/net.ifaces
|
|
|
712866 |
@@ -59,10 +61,10 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
|
|
|
712866 |
runcmd="RUN+=\"/sbin/initqueue --name ifup-\$env{INTERFACE} --unique --onetime $ifup\""
|
|
|
712866 |
|
|
|
712866 |
# We have some specific interfaces to handle
|
|
|
712866 |
- if [ -n "$IFACES" ]; then
|
|
|
712866 |
+ if [ -n "${RAW_IFACES}${IFACES}" ]; then
|
|
|
712866 |
echo 'SUBSYSTEM!="net", GOTO="net_end"'
|
|
|
712866 |
echo 'ACTION!="add|change|move", GOTO="net_end"'
|
|
|
712866 |
- for iface in $IFACES; do
|
|
|
712866 |
+ for iface in $IFACES $RAW_IFACES; do
|
|
|
712866 |
case "$iface" in
|
|
|
712866 |
??:??:??:??:??:??) # MAC address
|
|
|
712866 |
cond="ATTR{address}==\"$iface\""
|
|
|
712866 |
@@ -83,13 +85,7 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
|
|
|
712866 |
done
|
|
|
712866 |
echo 'LABEL="net_end"'
|
|
|
712866 |
|
|
|
712866 |
- if [ -n "$MASTER_IFACES" ]; then
|
|
|
712866 |
- wait_ifaces=$MASTER_IFACES
|
|
|
712866 |
- else
|
|
|
712866 |
- wait_ifaces=$IFACES
|
|
|
712866 |
- fi
|
|
|
712866 |
-
|
|
|
712866 |
- for iface in $wait_ifaces; do
|
|
|
712866 |
+ for iface in $IFACES; do
|
|
|
712866 |
if [ "$bootdev" = "$iface" ] || [ "$NEEDNET" = "1" ]; then
|
|
|
712866 |
echo "[ -f /tmp/net.${iface}.did-setup ]" >$hookdir/initqueue/finished/wait-$iface.sh
|
|
|
712866 |
fi
|