diff options
author | Martin Schwenke <martin@meltin.net> | 2018-02-28 15:02:03 +1100 |
---|---|---|
committer | Martin Schwenke <martins@samba.org> | 2018-03-01 19:39:15 +0100 |
commit | 248c37413756c582f50b820fafb03d59fa2e0f99 (patch) | |
tree | cca0f56757c66e4adca752b995fb3e7188a7fd29 /ctdb | |
parent | 9260ca217fd58903f924bba48515365f2f2228df (diff) | |
download | samba-248c37413756c582f50b820fafb03d59fa2e0f99.tar.gz |
ctdb-tools: Introduce a variable to hold the ssh command
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rwxr-xr-x | ctdb/tools/onnode | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ctdb/tools/onnode b/ctdb/tools/onnode index 0175513d1cb..890b60f0afc 100755 --- a/ctdb/tools/onnode +++ b/ctdb/tools/onnode @@ -368,11 +368,12 @@ for n in $nodes ; do # the filters to operate independently, the output of # stdout_filter is sent to a temporary file descriptor (3), which # is redirected back to stdout at the outermost level. + ssh_cmd="$ONNODE_SSH $ssh_opts $ONNODE_SSH_OPTS" if $parallel ; then { exec 3>&1 { - $ONNODE_SSH $ssh_opts $ONNODE_SSH_OPTS "$n" "$command" | + $ssh_cmd "$n" "$command" | stdout_filter >&3 } 2>&1 | stderr_filter } & @@ -385,7 +386,7 @@ for n in $nodes ; do { exec 3>&1 { - $ONNODE_SSH $ssh_opts $ONNODE_SSH_OPTS "$n" "$command" | + $ssh_cmd "$n" "$command" | stdout_filter >&3 } 2>&1 | stderr_filter } || retcode=$? |