ctdb-tools: Have onnode pass -n option even when regular ssh not in use
authorMartin Schwenke <martin@meltin.net>
Wed, 3 Oct 2018 09:13:57 +0000 (19:13 +1000)
committerAmitay Isaacs <amitay@samba.org>
Mon, 8 Oct 2018 00:46:23 +0000 (02:46 +0200)
ONNODE_SSH is really a test hook, so it doesn't need to support
completely random values.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tools/onnode

index bef04b0fce029fe068e629ff90343e59babc7dfd..eabe034d227a7a177bb04070f916dd92da58c3b3 100755 (executable)
@@ -302,12 +302,9 @@ 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
-       if [ "$ONNODE_SSH" = "ssh" ] ; then
-               if $parallel || ! $stdin ; then
-                       ssh_opts="-n"
-               fi
-       else
-               : # rsh? All bets are off!
+       # $ONNODE_SSH must accept the -n option - it can be ignored!
+       if $parallel || ! $stdin ; then
+               ssh_opts="-n"
        fi
 fi