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 <option>-p</option> or if <envar>SSH</envar> is set
- to anything other than "ssh".
+ using <option>-p</option> or if <envar>ONNODE_SSH</envar>
+ is set to anything other than "ssh".
</para>
</listitem>
</varlistentry>
</listitem>
</varlistentry>
- <varlistentry><term><filename>/usr/local/etc/ctdb/onnode.conf</filename></term>
- <listitem>
- <para>
- If this file exists it is sourced by onnode. The main
- purpose is to allow the administrator to set
- <envar>SSH</envar> 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.
+ <varlistentry>
+ <term><filename>/usr/local/etc/ctdb/onnode.conf</filename></term>
+ <listitem>
+ <para>
+ If this file exists it is sourced by onnode. The main
+ purpose is to allow the administrator to set
+ <envar>ONNODE_SSH</envar> to something other than "ssh".
+ In this case the -t option is ignored.
</para>
- </listitem>
+ </listitem>
</varlistentry>
</variablelist>
</refsect1>
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
{
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
} &
{
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=$?