improve shutdown documentation

This fixes #290.
This commit is contained in:
William Hubbs 2019-02-06 16:53:49 -06:00
parent 9b578808fb
commit 155b845194
2 changed files with 32 additions and 4 deletions

View File

@ -17,15 +17,35 @@
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Op Fl c , -cancel .Op Fl c , -cancel
.Nm
.Op Fl R , -reexec
.Nm
.Op Fl w , -write-only
.Nm
.Op Fl d , -no-write .Op Fl d , -no-write
.Op Fl D , -dry-run .Op Fl D , -dry-run
.Op Fl H , -halt .Op Fl H , -halt
time
.Nm
.Op Fl d , -no-write
.Op Fl D , -dry-run
.Op Fl k , -kexec .Op Fl k , -kexec
time
.Nm
.Op Fl d , -no-write
.Op Fl D , -dry-run
.Op Fl p , -poweroff .Op Fl p , -poweroff
.Op Fl R , -reexec time
.Nm
.Op Fl d , -no-write
.Op Fl D , -dry-run
.Op Fl r , -reboot .Op Fl r , -reboot
time
.Nm
.Op Fl d , -no-write
.Op Fl D , -dry-run
.Op Fl s , -single .Op Fl s , -single
.Op Fl w , -write-only time
.Sh DESCRIPTION .Sh DESCRIPTION
.Nm .Nm
is the utility that communicates with is the utility that communicates with
@ -56,7 +76,7 @@ Stop all services, kill all processes and reboot the system.
.It Fl s , -single .It Fl s , -single
Stop all services, kill all processes and move to single user mode. Stop all services, kill all processes and move to single user mode.
.It Fl w , -write-only .It Fl w , -write-only
Stop all services, kill all processes and move to single user mode. Wrrite a wtmp shutdown record and do nothing else.
.El .El
.Sh SEE ALSO .Sh SEE ALSO
.Xr openrc-init 8 , .Xr openrc-init 8 ,

View File

@ -67,7 +67,15 @@ const char * const longopts_help[] = {
"write wtmp boot record and exit", "write wtmp boot record and exit",
longopts_help_COMMON longopts_help_COMMON
}; };
const char *usagestring = NULL; const char *usagestring = "" \
"Usage: openrc-shutdown -c | --cancel\n" \
" or: openrc-shutdown -R | --reexec\n" \
" or: openrc-shutdown -w | --write-only\n" \
" or: openmrc-shutdown -H | --halt time\n" \
" or: openrc-shutdown -K | --kexec time\n" \
" or: openrc-shutdown -p | --poweroff time\n" \
" or: openrc-shutdown -r | --reboot time\n" \
" or: openrc-shutdown -s | --single time";
const char *exclusive = "Select one of " const char *exclusive = "Select one of "
"--cancel, --halt, --kexec, --poweroff, --reexec, --reboot, --single or \n" "--cancel, --halt, --kexec, --poweroff, --reexec, --reboot, --single or \n"
"--write-only"; "--write-only";