Skip to content

Commit

Permalink
clients/upsc.c, clients/upscmd.c, clients/upsrw.c, clients/upslog.c, …
Browse files Browse the repository at this point in the history
…clients/upsmon.c, clients/upssched.c: refer to local man (ifdef WITH_DOCS) and website page for these tools [networkupstools#722]

Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov committed Dec 24, 2024
1 parent e9afd6a commit 8c129fa
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 3 deletions.
2 changes: 2 additions & 0 deletions clients/upsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ static void usage(const char *prog)
printf(" -h - display this help text\n");

nut_report_config_flags();

printf("\n%s", suggest_doc_links(prog, NULL));
}

static void printvar(const char *var)
Expand Down
2 changes: 2 additions & 0 deletions clients/upscmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ static void usage(const char *prog)
printf(" [<value>] Additional data for command - number of seconds, etc.\n");

nut_report_config_flags();

printf("\n%s", suggest_doc_links(prog, "upsd.users"));
}

static void print_cmd(char *cmdname)
Expand Down
5 changes: 2 additions & 3 deletions clients/upslog.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,10 @@ static void help(const char *prog)
printf("format string defaults to:\n");
printf("%s\n", DEFAULT_LOGFORMAT);

printf("\n");
printf("See the upslog(8) man page for more information.\n");

nut_report_config_flags();

printf("\n%s", suggest_doc_links(prog, NULL));

exit(EXIT_SUCCESS);
}

Expand Down
2 changes: 2 additions & 0 deletions clients/upsmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -3021,6 +3021,8 @@ static void help(const char *arg_progname)

nut_report_config_flags();

printf("\n%s", suggest_doc_links(arg_progname, "upsmon.conf"));

exit(EXIT_SUCCESS);
}

Expand Down
2 changes: 2 additions & 0 deletions clients/upsrw.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ static void usage(const char *prog)
printf("Call without -s to show all possible read/write variables (same as -l).\n");

nut_report_config_flags();

printf("\n%s", suggest_doc_links(prog, "upsd.users"));
}

static void clean_exit(void)
Expand Down
2 changes: 2 additions & 0 deletions clients/upssched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1505,6 +1505,8 @@ static void help(const char *arg_progname)

nut_report_config_flags();

printf("\n%s", suggest_doc_links(arg_progname, "upsmon.conf"));

exit(EXIT_SUCCESS);
}

Expand Down

0 comments on commit 8c129fa

Please sign in to comment.