35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
From 319dc7fe10585a19d1a051f8ad1ba0190f86ff1f Mon Sep 17 00:00:00 2001
|
|
From: Wenchao Hao <haowenchao@huawei.com>
|
|
Date: Fri, 29 Apr 2022 14:09:02 +0800
|
|
Subject: [PATCH] fix(iscsi): do not exit in handle_netroot() if discovery
|
|
failed
|
|
|
|
User may specify multiple netroot in cmdline, failed to connect one netroot
|
|
do not mean all netroot are not accessible. So if one netroot failed, do
|
|
not exit the discovery and login flow.
|
|
|
|
Conflict:NA
|
|
Reference:https://github.com/dracutdevs/dracut/commit/319dc7fe10585a19d1a051f8ad1ba0190f86ff1f
|
|
|
|
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
|
|
---
|
|
modules.d/95iscsi/iscsiroot.sh | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh
|
|
index b326111f..63b4ce19 100755
|
|
--- a/modules.d/95iscsi/iscsiroot.sh
|
|
+++ b/modules.d/95iscsi/iscsiroot.sh
|
|
@@ -229,7 +229,7 @@ handle_netroot() {
|
|
echo "$target"
|
|
done
|
|
})
|
|
- [ -z "$targets" ] && echo "Target discovery to $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} failed with status $?" && exit 1
|
|
+ [ -z "$targets" ] && warn "Target discovery to $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} failed with status $?" && return 1
|
|
|
|
found=
|
|
for target in $targets; do
|
|
--
|
|
2.32.0
|
|
|