chiark / gitweb /
timedatectl,hostnamectl: rework --help text
authorLennart Poettering <lennart@poettering.net>
Fri, 19 Oct 2012 02:51:53 +0000 (04:51 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 19 Oct 2012 02:51:53 +0000 (04:51 +0200)
src/hostname/hostnamectl.c
src/timedate/timedatectl.c

index de2f7242ea1e4307fc7b4ed607b4ba10c8697edc..33245dd4f98d4d6e21622454ea40bb64953e8ed0 100644 (file)
@@ -303,19 +303,19 @@ static int set_icon_name(DBusConnection *bus, char **args, unsigned n) {
 
 static int help(void) {
 
-        printf("%s [OPTIONS...] {COMMAND} ...\n\n"
-               "Query or set system hostname.\n\n"
+        printf("%s [OPTIONS...] COMMAND ...\n\n"
+               "Query or change system hostname.\n\n"
                "  -h --help              Show this help\n"
                "     --version           Show package version\n"
-               "     --no-ask-password   Do not prompt for password\n"
                "     --transient         Only set transient hostname\n"
                "     --static            Only set static hostname\n"
                "     --pretty            Only set pretty hostname\n"
+               "     --no-ask-password   Do not prompt for password\n"
                "  -H --host=[USER@]HOST  Operate on remote host\n\n"
                "Commands:\n"
-               "  status                          Show current hostname settings\n"
-               "  set-hostname [NAME]             Set system hostname\n"
-               "  set-icon-name [NAME]            Set icon name for host\n",
+               "  status                 Show current hostname settings\n"
+               "  set-hostname NAME      Set system hostname\n"
+               "  set-icon-name NAME     Set icon name for host\n",
                program_invocation_short_name);
 
         return 0;
@@ -348,7 +348,7 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "hp:as:H:P", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "hH:P", options, NULL)) >= 0) {
 
                 switch (c) {
 
index 29aa1d5b359b1def6b8af06da6d1e0aec0d465f4..2b006ce924a552cf1577d265cce4c4a2d648ffa2 100644 (file)
@@ -430,8 +430,8 @@ static int list_timezones(DBusConnection *bus, char **args, unsigned n) {
 
 static int help(void) {
 
-        printf("%s [OPTIONS...] {COMMAND} ...\n\n"
-               "Query or control system time and date settings.\n\n"
+        printf("%s [OPTIONS...] COMMAND ...\n\n"
+               "Query or change system time and date settings.\n\n"
                "  -h --help              Show this help\n"
                "     --version           Show package version\n"
                "     --adjust-system-clock\n"
@@ -440,12 +440,12 @@ static int help(void) {
                "     --no-ask-password   Do not prompt for password\n"
                "  -H --host=[USER@]HOST  Operate on remote host\n\n"
                "Commands:\n"
-               "  status                          Show current time settings\n"
-               "  set-time [TIME]                 Set system time\n"
-               "  set-timezone [ZONE]             Set system timezone\n"
-               "  list-timezones                  Show known timezones\n"
-               "  set-local-rtc [BOOL]            Control whether RTC is in local time\n"
-               "  set-ntp [BOOL]                  Control whether NTP is enabled\n",
+               "  status                 Show current time settings\n"
+               "  set-time TIME          Set system time\n"
+               "  set-timezone ZONE      Set system timezone\n"
+               "  list-timezones         Show known timezones\n"
+               "  set-local-rtc BOOL     Control whether RTC is in local time\n"
+               "  set-ntp BOOL           Control whether NTP is enabled\n",
                program_invocation_short_name);
 
         return 0;
@@ -476,7 +476,7 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "+hp:as:H:P", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "+hH:P", options, NULL)) >= 0) {
 
                 switch (c) {