From: Wenchao Hao Date: Fri, 29 Apr 2022 06:09:02 +0000 (+0800) Subject: fix(iscsi): do not exit in handle_netroot() if discovery failed X-Git-Tag: 057~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=319dc7fe10585a19d1a051f8ad1ba0190f86ff1f;p=thirdparty%2Fdracut.git 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. Signed-off-by: Wenchao Hao --- diff --git a/modules.d/95iscsi/iscsiroot.sh b/modules.d/95iscsi/iscsiroot.sh index b326111f2..63b4ce19b 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