From 8c129faee2ad15d94d6ba79e327643dcd3451850 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 24 Dec 2024 00:30:47 +0100 Subject: [PATCH] clients/upsc.c, clients/upscmd.c, clients/upsrw.c, clients/upslog.c, clients/upsmon.c, clients/upssched.c: refer to local man (ifdef WITH_DOCS) and website page for these tools [#722] Signed-off-by: Jim Klimov --- clients/upsc.c | 2 ++ clients/upscmd.c | 2 ++ clients/upslog.c | 5 ++--- clients/upsmon.c | 2 ++ clients/upsrw.c | 2 ++ clients/upssched.c | 2 ++ 6 files changed, 12 insertions(+), 3 deletions(-) diff --git a/clients/upsc.c b/clients/upsc.c index d99d18085a..d2422944a2 100644 --- a/clients/upsc.c +++ b/clients/upsc.c @@ -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) diff --git a/clients/upscmd.c b/clients/upscmd.c index 3745014906..c9a04e8071 100644 --- a/clients/upscmd.c +++ b/clients/upscmd.c @@ -68,6 +68,8 @@ static void usage(const char *prog) printf(" [] 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) diff --git a/clients/upslog.c b/clients/upslog.c index f1d36b9fcc..33b8505822 100644 --- a/clients/upslog.c +++ b/clients/upslog.c @@ -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); } diff --git a/clients/upsmon.c b/clients/upsmon.c index 8c6a7876d2..786dc3b294 100644 --- a/clients/upsmon.c +++ b/clients/upsmon.c @@ -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); } diff --git a/clients/upsrw.c b/clients/upsrw.c index 892e6825e3..e1de6d6343 100644 --- a/clients/upsrw.c +++ b/clients/upsrw.c @@ -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) diff --git a/clients/upssched.c b/clients/upssched.c index eb822f0cd2..d636af6bf1 100644 --- a/clients/upssched.c +++ b/clients/upssched.c @@ -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); }