[SCM] CTDB repository - branch master updated - c26afe26cc5c1f9cd9eef74166b5fc39dde591d3

Ronnie Sahlberg sahlberg at samba.org
Sun Jul 13 23:53:35 GMT 2008


The branch, master has been updated
       via  c26afe26cc5c1f9cd9eef74166b5fc39dde591d3 (commit)
       via  f8c5f6ff1cae747aae917c454b49dc5db227e140 (commit)
       via  5168e9fa138995581fe5805f99ae569ce3c127f7 (commit)
      from  1de62d1ad71fa784d5e93f76da8f872cad9b9f42 (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit c26afe26cc5c1f9cd9eef74166b5fc39dde591d3
Author: Andrew Tridgell <tridge at samba.org>
Date:   Mon Jul 14 09:19:22 2008 +1000

    fixed up exit status for onnode

commit f8c5f6ff1cae747aae917c454b49dc5db227e140
Merge: 5168e9fa138995581fe5805f99ae569ce3c127f7 1de62d1ad71fa784d5e93f76da8f872cad9b9f42
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri Jul 11 19:21:39 2008 +1000

    Merge commit 'ronnie/master'

commit 5168e9fa138995581fe5805f99ae569ce3c127f7
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri Jul 4 18:03:24 2008 +1000

    fixed a case statement

-----------------------------------------------------------------------

Summary of changes:
 tools/onnode |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/tools/onnode b/tools/onnode
index 1e7e246..6d8ed17 100755
--- a/tools/onnode
+++ b/tools/onnode
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # Run commands on CTDB nodes.
 
@@ -171,9 +171,12 @@ trap 'kill -TERM $pids 2>/dev/null' INT TERM
 # There's a small race here where the kill can fail if no processes
 # have been added to $pids and the script is interrupted.  However,
 # the part of the window where it matter is very small.
+retcode=0
 for n in $nodes ; do
     if $parallel ; then
 	if $verbose ; then
+	    # pipefail is a bashism - is there some way to do this with plain sh?
+	    set -o pipefail 2>/dev/null
 	    ($SSH $ssh_opts $EXTRA_SSH_OPTS $n "$command" 2>&1 | sed -e "s@^@[$n] @" )&
 	else
 	    $SSH $ssh_opts $EXTRA_SSH_OPTS $n "$command" &
@@ -184,8 +187,17 @@ for n in $nodes ; do
 	    echo >&2 ; echo ">> NODE: $n <<" >&2
 	fi
 
-	$SSH $ssh_opts $EXTRA_SSH_OPTS $n "$command"
+	$SSH $ssh_opts $EXTRA_SSH_OPTS $n "$command" 
+	[ $? = 0 ] || retcode=$?
     fi
 done
 
-$parallel && wait
+$parallel && {
+    for p in $pids; do
+	wait $p
+	[ $? = 0 ] || retcode=$?
+    done
+}
+
+exit $retcode
+


-- 
CTDB repository


More information about the samba-cvs mailing list