Whamcloud - gitweb
b=23182 lustre-iokit sgpdd-survey defect
authorElena Gryaznova <grev@sun.com>
Wed, 21 Jul 2010 12:21:30 +0000 (16:21 +0400)
committerMikhail Pershin <tappro@sun.com>
Wed, 21 Jul 2010 14:21:12 +0000 (18:21 +0400)
i=Vladimir.Saveliev

lustre-iokit/sgpdd-survey/sgpdd-survey

index db40392..6d99457 100755 (executable)
@@ -65,7 +65,7 @@ if [ "$scsidevs" ]; then
        devs[$i]=`sg_map | awk "{if (\\\$2 == \"$d\") print \\\$1}"`
         if [ -z "${devs[i]}" ]; then
             echo "Can't find SG device for $d, testing for partition"
-            pt=`echo $d | sed 's/[0-9]$//'`
+            pt=`echo $d | sed 's/[0-9]*$//'`
             # Try again
             devs[$i]=`sg_map | awk "{if (\\\$2 == \"$pt\") print \\\$1}"`
             if [ -z "${devs[i]}" ]; then