The branch, master has been updated
       via  9aa09aee618fa71787c5d0e7c885e83f4d82236c (commit)
      from  68029894f80804c9f31fc90ed0c1b58f75812c3d (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 9aa09aee618fa71787c5d0e7c885e83f4d82236c
Author: Ronnie Sahlberg <[EMAIL PROTECTED]>
Date:   Fri May 16 09:21:44 2008 +1000

    add "machinereadable output" support to "ctdb getmonmode"

-----------------------------------------------------------------------

Summary of changes:
 tools/ctdb.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/tools/ctdb.c b/tools/ctdb.c
index 06ebf13..a9839d9 100644
--- a/tools/ctdb.c
+++ b/tools/ctdb.c
@@ -1189,8 +1189,12 @@ static int control_getmonmode(struct ctdb_context *ctdb, 
int argc, const char **
                DEBUG(DEBUG_ERR, ("Unable to get monmode from node %u\n", 
options.pnn));
                return ret;
        }
-       printf("Monitoring mode:%s 
(%d)\n",monmode==CTDB_MONITORING_ACTIVE?"ACTIVE":"DISABLED",monmode);
-
+       if (!options.machinereadable){
+               printf("Monitoring mode:%s 
(%d)\n",monmode==CTDB_MONITORING_ACTIVE?"ACTIVE":"DISABLED",monmode);
+       } else {
+               printf(":mode:\n");
+               printf(":%d:\n",monmode);
+       }
        return 0;
 }
 


-- 
CTDB repository

Reply via email to