File sg3_utils-check-if-hba-supports-issue-lip.patch of Package sg3_utils

Index: sg3_utils-1.35/scripts/rescan-scsi-bus.sh
===================================================================
--- sg3_utils-1.35.orig/scripts/rescan-scsi-bus.sh
+++ sg3_utils-1.35/scripts/rescan-scsi-bus.sh
@@ -750,8 +750,9 @@ for host in $hosts; do
   echo -n "Scanning host $host "
   if test -e /sys/class/fc_host/host$host ; then
     # It's pointless to do a target scan on FC
-    if test -n "$lipreset" ; then
-      echo 1 > /sys/class/fc_host/host$host/issue_lip 2> /dev/null;
+    issue_lip=/sys/class/fc_host/host$host/issue_lip
+    if test -e $issue_lip -a -n "$lipreset" ; then
+      echo 1 > $issue_lip 2> /dev/null;
       udevadm_settle
     fi
     channelsearch=
openSUSE Build Service is sponsored by