48 lines
1.9 KiB
Diff
48 lines
1.9 KiB
Diff
|
From 8680b657da61ce533f1c91e79eadd3c46f9e98d0 Mon Sep 17 00:00:00 2001
|
||
|
From: "Eugene S. Sobolev" <sobolev@protei.ru>
|
||
|
Date: Fri, 14 Feb 2020 11:49:06 +0300
|
||
|
Subject: [PATCH] network/net-lib.sh: Configure all iBFT interfaces
|
||
|
|
||
|
Added boolean command line option rd.iscsi.mp
|
||
|
|
||
|
(cherry picked from commit c7ee6b3dbb8dfad61aa337b2ecf7e4eaeddc4b4b)
|
||
|
|
||
|
Resolves: #1851984
|
||
|
---
|
||
|
dracut.cmdline.7.asc | 3 +++
|
||
|
modules.d/40network/net-lib.sh | 6 ++++--
|
||
|
2 files changed, 7 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
|
||
|
index 19b5cc87..9003c430 100644
|
||
|
--- a/dracut.cmdline.7.asc
|
||
|
+++ b/dracut.cmdline.7.asc
|
||
|
@@ -764,6 +764,9 @@ iscsistart -b --param node.session.timeo.replacement_timeout=30
|
||
|
**rd.iscsi.ibft** **rd.iscsi.ibft=1**:
|
||
|
Turn on iBFT autoconfiguration for the interfaces
|
||
|
|
||
|
+**rd.iscsi.mp** **rd.iscsi.mp=1**:
|
||
|
+ Configure all iBFT interfaces, not only used for booting (multipath)
|
||
|
+
|
||
|
**rd.iscsi.waitnet=0**:
|
||
|
Turn off waiting for all interfaces to be up before trying to login to the iSCSI targets.
|
||
|
|
||
|
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
||
|
index fc914b30..f0c1c041 100755
|
||
|
--- a/modules.d/40network/net-lib.sh
|
||
|
+++ b/modules.d/40network/net-lib.sh
|
||
|
@@ -251,8 +251,10 @@ ibft_to_cmdline() {
|
||
|
[ -e ${iface}/flags ] && flags=$(read a < ${iface}/flags; echo $a)
|
||
|
# Skip invalid interfaces
|
||
|
(( $flags & 1 )) || continue
|
||
|
- # Skip interfaces not used for booting
|
||
|
- (( $flags & 2 )) || continue
|
||
|
+ # Skip interfaces not used for booting unless using multipath
|
||
|
+ if ! getargbool 0 rd.iscsi.mp ; then
|
||
|
+ (( $flags & 2 )) || continue
|
||
|
+ fi
|
||
|
[ -e ${iface}/dhcp ] && dhcp=$(read a < ${iface}/dhcp; echo $a)
|
||
|
[ -e ${iface}/origin ] && origin=$(read a < ${iface}/origin; echo $a)
|
||
|
[ -e ${iface}/ip-addr ] && ip=$(read a < ${iface}/ip-addr; echo $a)
|
||
|
|