]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Skip iscsi attachment if no info 298/head
authorDerek Higgins <derekh@redhat.com>
Thu, 26 Oct 2017 14:29:42 +0000 (15:29 +0100)
committerDerek Higgins <derekh@redhat.com>
Thu, 26 Oct 2017 15:27:45 +0000 (16:27 +0100)
If no iscsi session information can be retrieved from the firmware
then skip the iscsi attachment and allow the boot process to continue.
Ensure the timeout scripts don't hit their timeout waiting for
/tmp/iscsistarted-firmware to be created.
This will allow a common image to be used for servers with both a
local and iscsi root with rd.iscsi.firmware set.

modules.d/95iscsi/iscsiroot.sh

index 379cc29647e48063aa57f9919c1bebf8f32570a9..aefd263da7f96ccb84da2b945cfbd8760c1336e8 100755 (executable)
@@ -44,8 +44,9 @@ fi
 handle_firmware()
 {
     if ! iscsistart -f; then
-        warn "iscistart: Could not get list of targets from firmware."
-        return 1
+        warn "iscistart: Could not get list of targets from firmware. Skipping."
+        echo 'skipped' > "/tmp/iscsistarted-firmware"
+        return 0
     fi
 
     for p in $(getargs rd.iscsi.param -d iscsi_param); do