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