Get ifaces for udev rule use

In case BOOTIF is not set and IFACES are not set in bonding/vlan/bridge code,
net-genrule.sh will fall to bring up all net interfaces.

Here add a failsafe option to read IFACES from /tmp/net.ifaces

[v1->v2]: move IFACES reading from net.ifaces after bonding/vlan/bridge info
code chunks.
[v2->v3]: [ -n "$IFACES" ] should be  [ -z "$IFACES" ]

Signed-off-by: Dave Young <dyoung@redhat.com>
master
dyoung@redhat.com 2012-12-12 12:23:25 +08:00 committed by Harald Hoyer
parent 9078167927
commit d7264a3cc0
1 changed files with 4 additions and 0 deletions

View File

@ -44,6 +44,10 @@ fi
IFACES+=" $phydevice"
fi

if [ -z "$IFACES" ]; then
[ -e /tmp/net.ifaces ] && read IFACES < /tmp/net.ifaces
fi

ifup='/sbin/ifup $env{INTERFACE}'
[ -z "$netroot" ] && ifup="$ifup -m"