aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-05-17 21:49:55 +0300
committerSergey Poznyakoff <gray@gnu.org>2018-05-17 21:49:55 +0300
commited8389beadb7cf1f8d95fe7addbc9ff2783f4d07 (patch)
treeaec21dde26528bf29fdcb232df0b997601e15c4e
parent41e4cf7b5ad33dcfc7f472b9392831fa197fd8e2 (diff)
downloadgenrc-ed8389beadb7cf1f8d95fe7addbc9ff2783f4d07.tar.gz
genrc-ed8389beadb7cf1f8d95fe7addbc9ff2783f4d07.tar.bz2
Improve help output
-rw-r--r--src/genrc.c44
1 files changed, 33 insertions, 11 deletions
diff --git a/src/genrc.c b/src/genrc.c
index d4904b6..ae3070d 100644
--- a/src/genrc.c
+++ b/src/genrc.c
@@ -163,7 +163,26 @@ char const *help_msg[] = {
"",
- "OPTIONs are:\n",
- " -h, --help display this help list",
- " --usage display short usage information",
+ "OPTIONs are:",
+ "",
+ "Command to run:",
+ "",
" -c, --command=COMMAND command line to run",
" -p, --program=PROGRAM name of the program to run",
+ "",
+ " At least one of COMMAND or PROGRAM must be given.",
+ " If PROGRAM is supplied, but COMMAND is not, COMMAND is set to PROGRAM",
+ " Otherwise, if COMMAND is set, but PROGRAM is not, PROGRAM is set to the",
+ " first word (in the shell sense) in COMMAND.",
+ "",
+ "Runtime privileges:",
+ "",
+ " -u, --user=NAME run with this user privileges",
+ " -g, --group=GROUP[,GROUP...]]",
+ " run with this group(s) privileges",
+ "",
+ "Additional configuration:",
+ "",
+ " -t, --timeout=SECONDS time to wait for the program to start up or",
+ " terminate",
+ " --sentinel PROGRAM runs in foreground; disconnect from the",
+ " controlling terminal, run it and act as a sentinel",
" -P, --pid-from=SOURCE where to look for PIDs of the running programs",
@@ -171,4 +190,2 @@ char const *help_msg[] = {
" (same as --pid-from=FILE:NAME)",
- " -t, --timeout=SECONDS time to wait for the program to start up or",
- " terminate",
" --signal-reload=SIG signal to send on reload (default: SIGHUP)",
@@ -178,4 +195,7 @@ char const *help_msg[] = {
" (default: SIGTERM)",
- " --sentinel PROGRAM runs in foreground; disconnect from the",
- " controlling terminal, run it and act as a sentinel",
+ "",
+ "Informational options:",
+ "",
+ " -h, --help display this help list",
+ " --usage display short usage information",
" --version display program version and exist",
@@ -189,7 +209,5 @@ char const *help_msg[] = {
" GENRC_SENTINEL=1 --sentinel",
+ " GENRC_USER=NAME --user=NAME",
+ " GENRC_GROUP=GROUPS --group=GROUPS",
"",
- " At least one of COMMAND or PROGRAM must be given.",
- " If PROGRAM is supplied, but COMMAND is not, COMMAND is set to PROGRAM",
- " Otherwise, if COMMAND is set, but PROGRAM is not, PROGRAM is set to the",
- " first word (in the shell sense) in COMMAND.",
"",
@@ -245,5 +263,8 @@ char const *usage_msg[] = {
"[-c COMMAND]",
+ "[-g GROUP[,GROUP...]]",
"[-p PROGRAM]",
"[-t SECONDS]",
+ "[-u USER]",
"[--command=COMMAND]",
+ "[--group GROUP[,GROUP...]]",
"[--help]",
@@ -258,2 +279,3 @@ char const *usage_msg[] = {
"[--usage]",
+ "[--user=USER]",
"{",

Return to:

Send suggestions and report system problems to the System administrator.