]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Get ifaces for udev rule use
authordyoung@redhat.com <dyoung@redhat.com>
Wed, 12 Dec 2012 04:23:25 +0000 (12:23 +0800)
committerHarald Hoyer <harald@redhat.com>
Fri, 14 Dec 2012 08:08:59 +0000 (09:08 +0100)
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>
modules.d/40network/net-genrules.sh

index 50e223d2cdefae5af4ae5f038e652fbae372d90b..7714614d843f9653872aa86709f7fe695cf06fee 100755 (executable)
@@ -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"