cluster: STABLE31 - rgmanager: Fix clustat help & version operations

Lon Hohberger lon at fedoraproject.org
Wed Jan 26 15:16:53 UTC 2011


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=5822073b63d1b83af623bb3c72dccc97f4eb2e27
Commit:        5822073b63d1b83af623bb3c72dccc97f4eb2e27
Parent:        9a4c263b0367fe2d80127e17b94c049e9ee2c59e
Author:        Lon Hohberger <lhh at redhat.com>
AuthorDate:    Wed Jan 26 10:16:27 2011 -0500
Committer:     Lon Hohberger <lhh at redhat.com>
CommitterDate: Wed Jan 26 10:16:27 2011 -0500

rgmanager: Fix clustat help & version operations

Signed-off-by: Lon Hohberger <lhh at redhat.com>
---
 rgmanager/src/utils/clustat.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/rgmanager/src/utils/clustat.c b/rgmanager/src/utils/clustat.c
index 2b47306..d7e8dd8 100644
--- a/rgmanager/src/utils/clustat.c
+++ b/rgmanager/src/utils/clustat.c
@@ -1031,11 +1031,11 @@ usage(char *arg0)
 "    -I                 Display local node ID and exit\n"
 "    -m <member>        Display status of <member> and exit\n"
 "    -s <service>       Display status of <service> and exit\n"
-"    -v                 Display version & cluster plugin and exit\n"
+"    -v                 Display version and exit\n"
 "    -x                 Dump information as XML\n"
-"    -Q			Return 0 if quorate, 1 if not (no output)\n"
-"    -f			Enable fast clustat reports\n"
-"    -l			Use long format for services\n"
+"    -Q                 Return 0 if quorate, 1 if not (no output)\n"
+"    -f                 Enable fast clustat reports\n"
+"    -l                 Use long format for services\n"
 "\n", basename(arg0));
 }
 
@@ -1130,7 +1130,7 @@ main(int argc, char **argv)
 
 	/* Connect & grab all our info */
 	ch = cman_init(NULL);
-	if (!ch) {
+	if (!ch && (runtype != VERSION_ONLY)) {
 		perror("Could not connect to CMAN");
 		return 1;
 	}
@@ -1144,8 +1144,6 @@ main(int argc, char **argv)
 	case VERSION_ONLY:
 		printf("%s version %s\n", basename(argv[0]),
 		       RELEASE_VERSION);
-		if (!ch)
-		       break;
 		goto cleanup;
 	case NODEID_ONLY:
 		if (!ch)


More information about the cluster-commits mailing list