Whamcloud - gitweb
b=23382 t-f: do_nodes(): wrong sed RE
authorElena Gryaznova <grev@sun.com>
Thu, 29 Jul 2010 12:25:57 +0000 (16:25 +0400)
committerJohann Lombardi <johann.lombardi@oracle.com>
Fri, 30 Jul 2010 13:49:24 +0000 (15:49 +0200)
i=Andrew.Perepechko

lustre/tests/test-framework.sh

index 374b114..ed86790 100644 (file)
@@ -1434,10 +1434,12 @@ do_nodes() {
         $myPDSH $rnodes $LCTL mark "$@" > /dev/null 2>&1 || :
     fi
 
-    if $verbose ; then
+    # do not replace anything from pdsh output if -N is used
+    # -N     Disable hostname: prefix on lines of output.
+    if $verbose || [[ $myPDSH = *-N* ]]; then
         $myPDSH $rnodes "(PATH=\$PATH:$RLUSTRE/utils:$RLUSTRE/tests:/sbin:/usr/sbin; cd $RPWD; sh -c \"$@\")"
     else
-        $myPDSH $rnodes "(PATH=\$PATH:$RLUSTRE/utils:$RLUSTRE/tests:/sbin:/usr/sbin; cd $RPWD; sh -c \"$@\")" | sed -re "s/\w+:\s//g"
+        $myPDSH $rnodes "(PATH=\$PATH:$RLUSTRE/utils:$RLUSTRE/tests:/sbin:/usr/sbin; cd $RPWD; sh -c \"$@\")" | sed -re "s/^[^:]*: //g"
     fi
     return ${PIPESTATUS[0]}
 }