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