RAID.tst: enhance status output
authorAlexander Barton <alex@barton.de>
Mon, 26 Sep 2011 09:20:01 +0000 (11:20 +0200)
committerAlexander Barton <alex@barton.de>
Mon, 26 Sep 2011 09:20:01 +0000 (11:20 +0200)
client/lib/tests/RAID.tst

index 53c57b2..074113d 100644 (file)
@@ -28,11 +28,12 @@ if [ `uname` = "Darwin" ]; then
                status=""
                while read x; do
                        v=`echo "$x" | cut -d' ' -f1`
-                       s=`echo "$x" | cut -b78-`
+                       s=`echo "$x" | cut -b67- | sed -e 's/://g'`
+                       s2=`echo "$x" | cut -b78-`
                        [ -n "$status" ] \
-                               && status="$status $v:$s" \
+                               && status="$status, $v:$s" \
                                || status="$v:$s"
-                       [ "$s" = "Good" ] && good=$good+1 || bad=bad+1
+                       [ "$s2" = "Good" ] && good=$good+1 || bad=bad+1
                done <"$tmp"
                if [ $bad -eq 0 -a $good -ge 1 ]; then
                        STATUS=0