aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2016-01-09 16:11:22 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2016-01-09 16:11:22 +0000
commit92f622b977ac1f47099c4092b816e11f531f47c2 (patch)
tree1c6a23eef7976f4e46cb90e238102c08b13871fe
parent4aff4a3415d4c4f20f32e2e29dddf4a8c178c1ba (diff)
downloadsg3_utils-92f622b977ac1f47099c4092b816e11f531f47c2.tar.gz
another rescan-scsi-bus.sh fix from Suse
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@656 6180dd3e-e324-4e3e-922d-17de1ae2f315
-rw-r--r--ChangeLog2
-rwxr-xr-xscripts/rescan-scsi-bus.sh4
2 files changed, 3 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 9372c52f..3165d7f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,7 @@ Each utility has its own version number, date of last change and
some description at the top of its ".c" file. All utilities in the main
directory have their own "man" pages. There is also a sg3_utils man page.
-Changelog for sg3_utils-1.42 [20160105] [svn: r655]
+Changelog for sg3_utils-1.42 [20160109] [svn: r656]
- sg_timestamp: new, to report or set timestamp
- sg_stpg: fix truncation of target port field
- sg_inq: cope with unicode strings, udev fixes
diff --git a/scripts/rescan-scsi-bus.sh b/scripts/rescan-scsi-bus.sh
index 4831c9dd..532c0d6a 100755
--- a/scripts/rescan-scsi-bus.sh
+++ b/scripts/rescan-scsi-bus.sh
@@ -861,7 +861,7 @@ findmultipath()
local maj_min=`cat /sys/block/$dev/dev`
for mp in $($DMSETUP ls --target=multipath | cut -f 1) ; do
- [ "$mp" = "No devices found" ] && break;
+ [ "$mp" = "No" ] && break;
if $($DMSETUP status $mp | grep -q " $maj_min ") ; then
# With two arguments, look up current uuid from sysfs
# if it doesn't match what was passed, this multipath
@@ -937,7 +937,7 @@ flushmpaths()
if test -n "$1" ; then
for mpath in $($DMSETUP ls --target=multipath | cut -f 1) ; do
- [ "$mpath" = "No devices found" ] && break
+ [ "$mpath" = "No" ] && break
num=$($DMSETUP status $mpath | awk 'BEGIN{RS=" ";active=0}/[0-9]+:[0-9]+/{dev=1}/A/{if (dev == 1) active++; dev=0} END{ print active }')
if [ $num -eq 0 ] ; then
remove="$remove $mpath"