Add a -Y machinereadable flag to "lvsmaster"
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 11 May 2009 04:44:59 +0000 (14:44 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 11 May 2009 04:44:59 +0000 (14:44 +1000)
tools/ctdb.c

index 44c8d074b584cb11a504c08d42fffa3ef315a8b4..ab631f85e0ab34381ade488161b3bfc20eb42dd9 100644 (file)
@@ -1876,7 +1876,11 @@ static int control_lvsmaster(struct ctdb_context *ctdb, int argc, const char **a
                        }
                }
 
-               printf("Node %d is LVS master\n", i);
+               if (options.machinereadable){
+                       printf("%d\n", i);
+               } else {
+                       printf("Node %d is LVS master\n", i);
+               }
                return 0;
        }