]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(iscsi): do not exit in handle_netroot() if discovery failed
authorWenchao Hao <haowenchao@huawei.com>
Fri, 29 Apr 2022 06:09:02 +0000 (14:09 +0800)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Thu, 5 May 2022 20:40:00 +0000 (20:40 +0000)
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.

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
modules.d/95iscsi/iscsiroot.sh

index b326111f26600bd32c0d5b29aaf1a8e039a7afb1..63b4ce19b9351e5efcf863f97e0961ecfa923d26 100755 (executable)
@@ -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