dracut/0046.patch

28 lines
1.1 KiB
Diff
Raw Normal View History

2018-01-05 09:46:51 +00:00
From fa54381b4eb4967b1b193b671baca31841ab6dfe Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@hoyer.xyz>
Date: Mon, 18 Dec 2017 09:02:39 +0100
Subject: [PATCH] Merge pull request #320 from danimo/ifname-bond
Do not pass ifname for bonding devices (bsc#995812)
---
modules.d/95nfs/module-setup.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh
index 31d90d42..b3ecf92d 100755
--- a/modules.d/95nfs/module-setup.sh
+++ b/modules.d/95nfs/module-setup.sh
@@ -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