diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2016-01-09 16:11:22 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2016-01-09 16:11:22 +0000 |
commit | 92f622b977ac1f47099c4092b816e11f531f47c2 (patch) | |
tree | 1c6a23eef7976f4e46cb90e238102c08b13871fe /scripts | |
parent | 4aff4a3415d4c4f20f32e2e29dddf4a8c178c1ba (diff) | |
download | sg3_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
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/rescan-scsi-bus.sh | 4 |
1 files changed, 2 insertions, 2 deletions
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" |