From: Martin Schwenke Date: Tue, 27 Feb 2018 01:11:54 +0000 (+1100) Subject: ctdb-tools: Change onnode to use ONNODE_SSH and ONNODE_SSH_OPTS X-Git-Tag: talloc-2.1.12~319 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9260ca217fd58903f924bba48515365f2f2228df;p=thirdparty%2Fsamba.git ctdb-tools: Change onnode to use ONNODE_SSH and ONNODE_SSH_OPTS Instead of more generic SSH and EXTRA_SSH_OPTS. Quietly drop reference to rsh in case it gives anyone ideas. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/doc/onnode.1.xml b/ctdb/doc/onnode.1.xml index d55f771c021..671bf405f85 100644 --- a/ctdb/doc/onnode.1.xml +++ b/ctdb/doc/onnode.1.xml @@ -74,8 +74,8 @@ Keep standard input open, allowing data to be piped to onnode. Normally onnode closes stdin to avoid surprises when scripting. Note that this option is ignored when - using or if SSH is set - to anything other than "ssh". + using or if ONNODE_SSH + is set to anything other than "ssh". @@ -292,16 +292,16 @@ - /usr/local/etc/ctdb/onnode.conf - - - If this file exists it is sourced by onnode. The main - purpose is to allow the administrator to set - SSH to something other than "ssh". In this - case the -t option is ignored. For example, the - administrator may choose to use use rsh instead of ssh. + + /usr/local/etc/ctdb/onnode.conf + + + If this file exists it is sourced by onnode. The main + purpose is to allow the administrator to set + ONNODE_SSH to something other than "ssh". + In this case the -t option is ignored. - + diff --git a/ctdb/tools/onnode b/ctdb/tools/onnode index ca9673a95b9..0175513d1cb 100755 --- a/ctdb/tools/onnode +++ b/ctdb/tools/onnode @@ -316,19 +316,19 @@ parse_options "$@" ssh_opts= if $push ; then - SSH=push - EXTRA_SSH_OPTS="" + ONNODE_SSH=push + ONNODE_SSH_OPTS="" else $current && command="cd $PWD && $command" if [ -n "$CTDB_NODES_SOCKETS" ] ; then - SSH=fakessh - EXTRA_SSH_OPTS="" + ONNODE_SSH=fakessh + ONNODE_SSH_OPTS="" else # Could "2>/dev/null || true" but want to see errors from typos in file. [ -r "${CTDB_BASE}/onnode.conf" ] && . "${CTDB_BASE}/onnode.conf" - [ -n "$SSH" ] || SSH=ssh - if [ "$SSH" = "ssh" ] ; then + [ -n "$ONNODE_SSH" ] || ONNODE_SSH=ssh + if [ "$ONNODE_SSH" = "ssh" ] ; then if $parallel || ! $stdin ; then ssh_opts="-n" fi @@ -372,7 +372,7 @@ for n in $nodes ; do { exec 3>&1 { - $SSH $ssh_opts $EXTRA_SSH_OPTS "$n" "$command" | + $ONNODE_SSH $ssh_opts $ONNODE_SSH_OPTS "$n" "$command" | stdout_filter >&3 } 2>&1 | stderr_filter } & @@ -385,7 +385,7 @@ for n in $nodes ; do { exec 3>&1 { - $SSH $ssh_opts $EXTRA_SSH_OPTS "$n" "$command" | + $ONNODE_SSH $ssh_opts $ONNODE_SSH_OPTS "$n" "$command" | stdout_filter >&3 } 2>&1 | stderr_filter } || retcode=$?