Blame SOURCES/0001-tools-Update-the-usage-help-text-of-the-realm-comman.patch

3eb28c
From 3bdf6f25923c3a3bd8404f4a1228053d6a7551b2 Mon Sep 17 00:00:00 2001
3eb28c
From: Stef Walter <stefw@redhat.com>
3eb28c
Date: Mon, 6 Feb 2017 12:32:20 +0100
3eb28c
Subject: [PATCH] tools: Update the usage help text of the realm commands
3eb28c
3eb28c
Add  better synopsis, sort arguments appropriately, and include
3eb28c
missing arguments.
3eb28c
---
3eb28c
 tools/realm-discover.c |  4 ++--
3eb28c
 tools/realm-join.c     | 30 +++++++++++++++---------------
3eb28c
 2 files changed, 17 insertions(+), 17 deletions(-)
3eb28c
3eb28c
diff --git a/tools/realm-discover.c b/tools/realm-discover.c
3eb28c
index cec3fd0..8dde4ed 100644
3eb28c
--- a/tools/realm-discover.c
3eb28c
+++ b/tools/realm-discover.c
3eb28c
@@ -186,7 +186,7 @@ realm_discover (RealmClient *client,
3eb28c
 		{ NULL, }
3eb28c
 	};
3eb28c
 
3eb28c
-	context = g_option_context_new ("realm-or-domain");
3eb28c
+	context = g_option_context_new ("discover REALM-OR-DOMAIN");
3eb28c
 	g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
3eb28c
 	g_option_context_add_main_entries (context, option_entries, NULL);
3eb28c
 	g_option_context_add_main_entries (context, realm_global_options, NULL);
3eb28c
@@ -274,7 +274,7 @@ realm_list (RealmClient *client,
3eb28c
 		{ NULL, }
3eb28c
 	};
3eb28c
 
3eb28c
-	context = g_option_context_new ("realm");
3eb28c
+	context = g_option_context_new ("list");
3eb28c
 	g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
3eb28c
 	g_option_context_add_main_entries (context, option_entries, NULL);
3eb28c
 	g_option_context_add_main_entries (context, realm_global_options, NULL);
3eb28c
diff --git a/tools/realm-join.c b/tools/realm-join.c
3eb28c
index 8e46c20..249f502 100644
3eb28c
--- a/tools/realm-join.c
3eb28c
+++ b/tools/realm-join.c
3eb28c
@@ -286,28 +286,28 @@ realm_join (RealmClient *client,
3eb28c
 	gint ret = 0;
3eb28c
 
3eb28c
 	GOptionEntry option_entries[] = {
3eb28c
-		{ "user", 'U', 0, G_OPTION_ARG_STRING, &args.user,
3eb28c
-		  N_("User name to use for enrollment"), NULL },
3eb28c
-		{ "computer-ou", 0, 0, G_OPTION_ARG_STRING, &args.computer_ou,
3eb28c
-		  N_("Computer OU DN to join"), NULL },
3eb28c
-		{ "computer-name", 0, 0, G_OPTION_ARG_STRING, &args.computer_name,
3eb28c
-			N_("Use specific computer name instead of hostname"), NULL },
3eb28c
-		{ "os-name", 0, 0, G_OPTION_ARG_STRING, &args.os_name,
3eb28c
-			N_("Use specific operation system name"), NULL },
3eb28c
-		{ "os-version", 0, 0, G_OPTION_ARG_STRING, &args.os_version,
3eb28c
-			N_("Use specific operation system version"), NULL },
3eb28c
+		{ "automatic-id-mapping", 0, G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_CALLBACK,
3eb28c
+		  realm_join_arg_id_mapping, N_("Turn off automatic id mapping"), "no" },
3eb28c
 		{ "client-software", 0, 0, G_OPTION_ARG_STRING, &args.client_software,
3eb28c
 		  N_("Use specific client software"), NULL },
3eb28c
-		{ "server-software", 0, 0, G_OPTION_ARG_STRING, &args.server_software,
3eb28c
-		  N_("Use specific server software"), NULL },
3eb28c
+		{ "computer-name", 0, 0, G_OPTION_ARG_STRING, &args.computer_name,
3eb28c
+                  N_("Use specific computer name instead of hostname"), NULL },
3eb28c
+		{ "computer-ou", 0, 0, G_OPTION_ARG_STRING, &args.computer_ou,
3eb28c
+		  N_("Computer OU DN to join"), NULL },
3eb28c
 		{ "membership-software", 0, 0, G_OPTION_ARG_STRING, &args.membership_software,
3eb28c
 		  N_("Use specific membership software"), NULL },
3eb28c
 		{ "no-password", 0, 0, G_OPTION_ARG_NONE, &args.no_password,
3eb28c
 		  N_("Join automatically without a password"), NULL },
3eb28c
 		{ "one-time-password", 0, 0, G_OPTION_ARG_STRING, &args.one_time_password,
3eb28c
 		  N_("Join using a preset one time password"), NULL },
3eb28c
-		{ "automatic-id-mapping", 0, G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_CALLBACK,
3eb28c
-		  realm_join_arg_id_mapping, N_("Turn off automatic id mapping"), "no" },
3eb28c
+		{ "os-name", 0, 0, G_OPTION_ARG_STRING, &args.os_name,
3eb28c
+                  N_("Use specific operation system name"), NULL },
3eb28c
+		{ "os-version", 0, 0, G_OPTION_ARG_STRING, &args.os_version,
3eb28c
+                  N_("Use specific operation system version"), NULL },
3eb28c
+		{ "server-software", 0, 0, G_OPTION_ARG_STRING, &args.server_software,
3eb28c
+		  N_("Use specific server software"), NULL },
3eb28c
+		{ "user", 'U', 0, G_OPTION_ARG_STRING, &args.user,
3eb28c
+		  N_("User name to use for enrollment"), NULL },
3eb28c
 		{ "user-principal", 0, 0, G_OPTION_ARG_STRING, &args.user_principal,
3eb28c
 		  N_("Set the user principal for the computer account"), NULL },
3eb28c
 		{ NULL, }
3eb28c
@@ -315,7 +315,7 @@ realm_join (RealmClient *client,
3eb28c
 
3eb28c
 	memset (&args, 0, sizeof (args));
3eb28c
 
3eb28c
-	context = g_option_context_new ("realm");
3eb28c
+	context = g_option_context_new ("join REALM");
3eb28c
 	g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
3eb28c
 
3eb28c
 	group = g_option_group_new (NULL, NULL, NULL, &args, realm_join_args_clear);
3eb28c
-- 
3eb28c
2.26.2
3eb28c