ctdb-tools: Support "ctdb ip all" as equivalent to "ctdb ip -n all"
authorMartin Schwenke <martin@meltin.net>
Tue, 20 Oct 2015 01:25:01 +0000 (12:25 +1100)
committerAmitay Isaacs <amitay@samba.org>
Fri, 23 Oct 2015 01:43:26 +0000 (03:43 +0200)
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tools/ctdb.c

index fa41412af46a470976194572f6b7d90244d2baf5..d50e5e978a3193f7f4df4865155eb70610a22ae3 100644 (file)
@@ -2951,6 +2951,10 @@ static int control_ip(struct ctdb_context *ctdb, int argc, const char **argv)
        TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
        struct ctdb_all_public_ips *ips;
 
+       if (argc == 1 && strcmp(argv[0], "all") == 0) {
+               options.pnn = CTDB_BROADCAST_ALL;
+       }
+
        if (options.pnn == CTDB_BROADCAST_ALL) {
                /* read the list of public ips from all nodes */
                ret = control_get_all_public_ips(ctdb, tmp_ctx, &ips);