From: Martin Schwenke Date: Wed, 28 Feb 2018 04:11:56 +0000 (+1100) Subject: ctdb-tools: Remove test hooks from onnode X-Git-Tag: talloc-2.1.12~314 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8f9ac941902c587b9920e1ff4be77d6d4e3bbe4b;p=thirdparty%2Fsamba.git ctdb-tools: Remove test hooks from onnode CTDB_NODES_SOCKETS is no longer used. The test code uses ONNODE_SSH to run a fake ssh client. Leave indenting sloppy and fix it in the next commit so that this change is clear. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tools/onnode b/ctdb/tools/onnode index e015a42c123..773696e9c67 100755 --- a/ctdb/tools/onnode +++ b/ctdb/tools/onnode @@ -220,9 +220,6 @@ get_nodes () { local all_nodes - if [ -n "$CTDB_NODES_SOCKETS" ] ; then - all_nodes="$CTDB_NODES_SOCKETS" - else local f="${CTDB_BASE}/nodes" if [ -n "$CTDB_NODES_FILE" ] ; then f="$CTDB_NODES_FILE" @@ -240,7 +237,6 @@ get_nodes () fi all_nodes=$(sed -e 's@#.*@@g' -e 's@ *@@g' -e 's@^$@#DEAD@' "$f") - fi local n nodes nodes=$(parse_nodespec "$1") || exit $? @@ -285,11 +281,6 @@ push() done } -fakessh () -{ - CTDB_SOCKET="$1" sh -c "$2" -} - stdout_filter () { if [ -n "$prefix" ] ; then @@ -321,10 +312,6 @@ if $push ; then else $current && command="cd $PWD && $command" - if [ -n "$CTDB_NODES_SOCKETS" ] ; then - 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 "$ONNODE_SSH" ] || ONNODE_SSH=ssh @@ -335,7 +322,6 @@ else else : # rsh? All bets are off! fi - fi fi ######################################################################