9abf8c
From dc6438116746147e55c624a58116cc7f9f254c8a Mon Sep 17 00:00:00 2001
9abf8c
From: Lukas Nykryn <lnykryn@redhat.com>
9abf8c
Date: Thu, 7 Feb 2019 16:09:43 +0100
9abf8c
Subject: [PATCH] 95iscsi:
9abf8c
 /sys/devices/platform/*/flashnode_sess-*/is_boot_target sometimes does not
9abf8c
 exist
9abf8c
9abf8c
cat: '/sys/devices/platform/host2/flashnode_sess-*/is_boot_target': No such file or directory
9abf8c
/usr/lib/dracut/modules.d/95iscsi/module-setup.sh: line 90: [: -eq: unary operator expected
9abf8c
9abf8c
(cherry picked from commit 94eccd15c533f9e10cb0ccdec7e8a42c29bbc8d0)
9abf8c
9abf8c
Resolves: #1552619
9abf8c
---
9abf8c
 modules.d/95iscsi/module-setup.sh | 1 +
9abf8c
 1 file changed, 1 insertion(+)
9abf8c
9abf8c
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
9abf8c
index 47a92e94..dc63ef46 100755
9abf8c
--- a/modules.d/95iscsi/module-setup.sh
9abf8c
+++ b/modules.d/95iscsi/module-setup.sh
9abf8c
@@ -86,6 +86,7 @@ install_iscsiroot() {
9abf8c
     iscsi_host=${host##*/}
9abf8c
 
9abf8c
     for flash in ${host}/flashnode_sess-* ; do
9abf8c
+        [ ! -e "$flash/is_boot_target" ] && continue
9abf8c
         is_boot=$(cat $flash/is_boot_target)
9abf8c
         if [ $is_boot -eq 1 ] ; then
9abf8c
             # qla4xxx flashnode session; skip iBFT discovery
9abf8c