diff options
author | Martin Schwenke <martin@meltin.net> | 2018-03-09 16:36:39 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2018-03-19 02:23:19 +0100 |
commit | 16a93d7691998654213226d659d968d912e56c58 (patch) | |
tree | 3d9c550bfaf1c38793da73d26b6e53c290c6867c /ctdb | |
parent | c8c944d6186db11dc6523b2b32d4f70072e5cdfd (diff) | |
download | samba-16a93d7691998654213226d659d968d912e56c58.tar.gz |
ctdb-tools: Drop onnode CTDB_NODES_FILE environment variable
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/doc/onnode.1.xml | 33 | ||||
-rw-r--r-- | ctdb/tests/onnode/scripts/local.sh | 1 | ||||
-rwxr-xr-x | ctdb/tools/onnode | 9 |
3 files changed, 16 insertions, 27 deletions
diff --git a/ctdb/doc/onnode.1.xml b/ctdb/doc/onnode.1.xml index 671bf405f85..a73230e87de 100644 --- a/ctdb/doc/onnode.1.xml +++ b/ctdb/doc/onnode.1.xml @@ -57,15 +57,15 @@ </varlistentry> <varlistentry><term>-f <parameter>FILENAME</parameter></term> - <listitem> - <para> - Specify an alternative nodes FILENAME to use instead of - the default. This option overrides the CTDB_NODES_FILE - and CTDB_NODES variables. See the discussion of - <filename>/usr/local/etc/ctdb/nodes</filename> in the FILES section - for more details. + <listitem> + <para> + Specify an alternative nodes FILENAME to use instead of + the default. This option overrides the CTDB_NODES + variable. See the discussion of + <filename>/usr/local/etc/ctdb/nodes</filename> in the + FILES section for more details. </para> - </listitem> + </listitem> </varlistentry> <varlistentry><term>-i</term> @@ -247,16 +247,6 @@ </listitem> </varlistentry> - <varlistentry><term><envar>CTDB_NODES_FILE</envar></term> - <listitem> - <para> - Name of alternative nodes file to use instead of the - default. See the <citetitle>FILES</citetitle> section for - more details. - </para> - </listitem> - </varlistentry> - </variablelist> </refsect1> @@ -271,16 +261,15 @@ or hostname. </para> <para> - As above, a file specified via the <option>-f</option> or - <envar>CTDB_NODES_FILE</envar> is given precedence. If a + As above, a file specified via the <option>-f</option> + is given precedence. If a relative path is specified and no corresponding file exists relative to the current directory then the file is also searched for in the <filename>$CTDB_BASE</filename> directory. </para> <para> - If <envar>CTDB_NODES_FILE</envar> is not set and - <envar>CTDB_NODES</envar> is set in configuration then the + If <envar>CTDB_NODES</envar> is set in configuration then the file pointed to by <envar>CTDB_NODES</envar> is used. </para> <para> diff --git a/ctdb/tests/onnode/scripts/local.sh b/ctdb/tests/onnode/scripts/local.sh index 337fad1e964..d5067f8cb6c 100644 --- a/ctdb/tests/onnode/scripts/local.sh +++ b/ctdb/tests/onnode/scripts/local.sh @@ -41,7 +41,6 @@ extra_footer () { cat <<EOF -------------------------------------------------- -CTDB_NODES_FILE="${CTDB_NODES_FILE}" CTDB_BASE="$CTDB_BASE" ctdb client is $(which ctdb) -------------------------------------------------- diff --git a/ctdb/tools/onnode b/ctdb/tools/onnode index 036aae49331..25237601268 100755 --- a/ctdb/tools/onnode +++ b/ctdb/tools/onnode @@ -31,7 +31,7 @@ usage () Usage: onnode [OPTION] ... <NODES> <COMMAND> ... options: -c Run in current working directory on specified nodes. - -f Specify nodes file, overrides CTDB_NODES_FILE. + -f Specify nodes file, overriding default. -i Keep standard input open - the default is to close it. -n Allow nodes to be specified by name. -o <prefix> Save standard output from each node to file <prefix>.<ip> @@ -57,6 +57,7 @@ invalid_nodespec () # Defaults. current=false +ctdb_nodes_file="" parallel=false verbose=false quiet=false @@ -90,7 +91,7 @@ parse_options () while true ; do case "$1" in -c) current=true ; shift ;; - -f) CTDB_NODES_FILE="$2" ; shift 2 ;; + -f) ctdb_nodes_file="$2" ; shift 2 ;; -n) names_ok=true ; shift ;; -o) prefix="$2" ; shift 2 ;; -p) parallel=true ; shift ;; @@ -221,8 +222,8 @@ get_nodes () local all_nodes local f="${CTDB_BASE}/nodes" - if [ -n "$CTDB_NODES_FILE" ] ; then - f="$CTDB_NODES_FILE" + if [ -n "$ctdb_nodes_file" ] ; then + f="$ctdb_nodes_file" if [ ! -e "$f" -a "${f#/}" = "$f" ] ; then # $f is relative, try in $CTDB_BASE f="${CTDB_BASE}/${f}" |