]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
95iscsi: /sys/devices/platform/*/flashnode_sess-*/is_boot_target sometimes does not...
authorLukas Nykryn <lnykryn@redhat.com>
Thu, 7 Feb 2019 15:09:43 +0000 (16:09 +0100)
committerHarald Hoyer <harald@hoyer.xyz>
Thu, 7 Feb 2019 15:19:00 +0000 (16:19 +0100)
cat: '/sys/devices/platform/host2/flashnode_sess-*/is_boot_target': No such file or directory
/usr/lib/dracut/modules.d/95iscsi/module-setup.sh: line 90: [: -eq: unary operator expected

modules.d/95iscsi/module-setup.sh

index f6f3520d313e64bb4c72d7eb84ace61ef32287d1..4b6c4a3c8ef5ab9f1dfe3a1bd3077205c12d173d 100755 (executable)
@@ -86,6 +86,7 @@ install_iscsiroot() {
     iscsi_host=${host##*/}
 
     for flash in ${host}/flashnode_sess-* ; do
+        [ ! -e "$flash/is_boot_target" ] && continue
         is_boot=$(cat $flash/is_boot_target)
         if [ $is_boot -eq 1 ] ; then
             # qla4xxx flashnode session; skip iBFT discovery