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