ctdb-tools: Drop onnode -o option
authorMartin Schwenke <martin@meltin.net>
Fri, 28 Jun 2019 05:43:27 +0000 (15:43 +1000)
committerAmitay Isaacs <amitay@samba.org>
Fri, 5 Jul 2019 05:03:22 +0000 (05:03 +0000)
I don't think anyone uses this and it causes complications.

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

index c9d56a97dd58ec8763eaa49d9b8470b9e95d12a0..f7da04aedbe0be95eda75aa15ef216114f92438f 100644 (file)
         </listitem>
       </varlistentry>
 
-      <varlistentry><term>-o <parameter>PREFIX</parameter></term>
-        <listitem>
-          <para>
-           Causes standard output from each node to be saved into a
-           file with name PREFIX.<replaceable>IP</replaceable>.
-         </para>
-        </listitem>
-      </varlistentry>
-
       <varlistentry><term>-p</term>
         <listitem>
           <para>
index 13b0d19b3eececb2ddcbedb7fcd5c9a73d72ad4d..76cd2217a0d93dd5912acde8391f70f788f152ca 100755 (executable)
@@ -34,7 +34,6 @@ Usage: onnode [OPTION] ... <NODES> <COMMAND> ...
     -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>
     -p          Run command in parallel on specified nodes.
     -P          Push given files to nodes instead of running commands.
     -q          Do not print node addresses (overrides -v).
@@ -61,7 +60,6 @@ ctdb_nodes_file=""
 parallel=false
 verbose=false
 quiet=false
-prefix=""
 names_ok=false
 push=false
 stdin=false
@@ -79,7 +77,6 @@ parse_options ()
                c) current=true ;;
                f) ctdb_nodes_file="$OPTARG" ;;
                n) names_ok=true ;;
-               o) prefix="$OPTARG" ;;
                p) parallel=true ;;
                q) quiet=true ;;
                v) verbose=true ;;
@@ -274,9 +271,7 @@ push()
 
 stdout_filter ()
 {
-    if [ -n "$prefix" ] ; then
-       cat >"${prefix}.${n//\//_}"
-    elif $verbose && $parallel ; then
+    if $verbose && $parallel ; then
        sed -e "s@^@[$n] @"
     else
        cat