]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Do not pass ifname for bonding devices (bsc#995812) 328/head
authorDaniel Molkentin <dmolkentin@suse.com>
Thu, 2 Mar 2017 15:52:45 +0000 (16:52 +0100)
committerDaniel Molkentin <dmolkentin@suse.com>
Fri, 15 Dec 2017 20:55:41 +0000 (21:55 +0100)
Patch-By: Thomas Renninger <trenn@suse.de>
modules.d/95nfs/module-setup.sh

index 31d90d427ad5dfb0067d9e663b05146bcc3ac17b..b3ecf92d9b864af827e40f7a5f2ac9cd86743c0e 100755 (executable)
@@ -57,7 +57,10 @@ cmdline() {
         nfs_address=${lookup##* }
     fi
     ifname=$(ip -o route get to $nfs_address | sed -n 's/.*dev \([^ ]*\).*/\1/p')
-    if [ -e /sys/class/net/$ifname/address ] ; then
+    if [ -d /sys/class/net/$ifname/bonding ]; then
+        dinfo "Found bonded interface '${ifname}'. Make sure to provide an appropriate 'bond=' cmdline."
+        return
+    elif [ -e /sys/class/net/$ifname/address ] ; then
         ifmac=$(cat /sys/class/net/$ifname/address)
         printf 'ifname=%s:%s ' ${ifname} ${ifmac}
     fi