From 76df542c5477d58209d44fb0d2a7bd2936336557 Mon Sep 17 00:00:00 2001 From: cliffw Date: Fri, 31 Mar 2006 16:53:37 +0000 Subject: [PATCH] b=10371 r=scjody@clusterfs.com Fixed error with multiple scsidevs --- lustre-iokit/sgpdd-survey/sgpdd-survey | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lustre-iokit/sgpdd-survey/sgpdd-survey b/lustre-iokit/sgpdd-survey/sgpdd-survey index 100d456..b5c1f01 100755 --- a/lustre-iokit/sgpdd-survey/sgpdd-survey +++ b/lustre-iokit/sgpdd-survey/sgpdd-survey @@ -5,10 +5,9 @@ # CHOOSE EITHER scsidevs or rawdevs # the SCSI devices to measure - WARNING: will be erased. -#scsidevs="/dev/sde /dev/sdh" # The raw devices to use -#rawdevs="/dev/raw/raw1" -#scsidevs=`ls /dev/sd[a-z] /dev/sd[a-z][a-z]` # all devices, if you use udev +# rawdevs=${rawdevs:-"/dev/raw/raw1"} +# scsidevs=`ls /dev/sd[a-z] /dev/sd[a-z][a-z]` # all devices, if you use udev # result file prefix. date/time+hostname makes unique # NB ensure the path exists if it includes subdirs @@ -45,7 +44,7 @@ SG_MAX_QUEUE=16 # map given device names into SG device names i=0 devs=() -if [ $scsidevs ]; then +if [ "$scsidevs" ]; then # we will test for a LUN, the test for a partition # if the partition number is > 9 this will fail for d in $scsidevs; do @@ -62,7 +61,7 @@ if [ $scsidevs ]; then fi i=$((i+1)) done -elif [ $rawdevs ]; then +elif [ "$rawdevs" ]; then for r in $rawdevs; do RES=`raw -q $r` if [ $? -eq 0 ];then -- 1.8.3.1