sg3_utils/9005-for-dolunscan.patch
2019-09-30 11:17:00 -04:00

29 lines
712 B
Diff

diff --git a/scripts/rescan-scsi-bus.sh b/scripts/rescan-scsi-bus.sh
index 417dd1d..4b23ba4 100755
--- a/scripts/rescan-scsi-bus.sh
+++ b/scripts/rescan-scsi-bus.sh
@@ -594,6 +594,7 @@ doreportlun()
if test $tmplun -eq $lun ; then
inlist=1
dolunscan $lun0added
+ [ $? -eq 1 ] && break
else
newsearch="$newsearch $tmplun"
fi
@@ -610,6 +611,7 @@ doreportlun()
# Add new ones and check stale ones
for lun in $targetluns $lunremove; do
dolunscan $lun0added
+ [ $? -eq 1 ] && break
done
}
@@ -629,6 +631,7 @@ dosearch ()
else
for lun in $lunsearch; do
dolunscan
+ [ $? -eq 1 ] && break
done
fi
done