Sync shutdown manual page and usage information. Patch from Mike

Frysinger and Gentoo.
This commit is contained in:
Petter Reinholdtsen 2009-11-20 22:33:35 +00:00
parent 6bf849d01d
commit d56e3c239e
3 changed files with 21 additions and 19 deletions

View File

@ -14,6 +14,8 @@ sysvinit (2.88dsf) UNRELEASED; urgency=low
* Add Makefile in toplevel directory. * Add Makefile in toplevel directory.
* Print usage information when shutdown is used by non-root user. * Print usage information when shutdown is used by non-root user.
Patch from Mike Frysinger and Gentoo. Patch from Mike Frysinger and Gentoo.
* Sync shutdown manual page and usage information. Patch from Mike
Frysinger and Gentoo.
-- Petter Reinholdtsen <pere@hungry.com> Sun, 12 Jul 2009 19:58:10 +0200 -- Petter Reinholdtsen <pere@hungry.com> Sun, 12 Jul 2009 19:58:10 +0200

View File

@ -26,11 +26,11 @@ shutdown \- bring the system down
.\"{{{ Synopsis .\"{{{ Synopsis
.SH SYNOPSIS .SH SYNOPSIS
.B /sbin/shutdown .B /sbin/shutdown
.RB [ \-akrhPHfFnc ]
.RB [ \-t .RB [ \-t
.IR sec ] .IR sec ]
.RB [ \-arkhncfFHP ]
.I time .I time
.RI [ warning-message ] .RI [ "warning message" ]
.\"}}} .\"}}}
.\"{{{ Description .\"{{{ Description
.SH DESCRIPTION .SH DESCRIPTION
@ -56,11 +56,6 @@ entries for these runlevels in the file \fI/etc/inittab\fP.
.IP "\fB\-a\fP .IP "\fB\-a\fP
Use \fB/etc/shutdown.allow\fP. Use \fB/etc/shutdown.allow\fP.
.\"}}} .\"}}}
.\"{{{ -t sec
.IP "\fB\-t\fP \fIsec\fP"
Tell \fBinit\fP(8) to wait \fIsec\fP seconds between sending processes the
warning and the kill signal, before changing to another runlevel.
.\"}}}
.\"{{{ -k .\"{{{ -k
.IP \fB\-k\fP .IP \fB\-k\fP
Don't really shutdown; only send the warning messages to everybody. Don't really shutdown; only send the warning messages to everybody.
@ -73,20 +68,14 @@ Reboot after shutdown.
.IP \fB\-h\fP .IP \fB\-h\fP
Halt or power off after shutdown. Halt or power off after shutdown.
.\"}}} .\"}}}
.\"{{{ -H
.IP \fB\-H\fP
Modifier to the -h flag. Halt action is to halt or drop into boot
monitor on systems that support it. Must be used with the -h flag.
.\"}}}
.\"{{{ -P .\"{{{ -P
.IP \fB\-P\fP .IP \fB\-P\fP
Halt action is to turn off the power. Halt action is to turn off the power.
.\"}}} .\"}}}
.\"{{{ -n .\"{{{ -H
.IP \fB\-n\fP .IP \fB\-H\fP
[DEPRECATED] Don't call \fBinit\fP(8) to do the shutdown but do it ourself. Modifier to the -h flag. Halt action is to halt or drop into boot
The use of this option is discouraged, and its results are not always what monitor on systems that support it. Must be used with the -h flag.
you'd expect.
.\"}}} .\"}}}
.\"{{{ -f .\"{{{ -f
.IP \fB\-f\fP .IP \fB\-f\fP
@ -96,18 +85,29 @@ Skip fsck on reboot.
.IP \fB\-F\fP .IP \fB\-F\fP
Force fsck on reboot. Force fsck on reboot.
.\"}}} .\"}}}
.\"{{{ -n
.IP \fB\-n\fP
[DEPRECATED] Don't call \fBinit\fP(8) to do the shutdown but do it ourself.
The use of this option is discouraged, and its results are not always what
you'd expect.
.\"}}}
.\"{{{ -c .\"{{{ -c
.IP \fB\-c\fP .IP \fB\-c\fP
Cancel an already running shutdown. With this option it is of course Cancel an already running shutdown. With this option it is of course
not possible to give the \fBtime\fP argument, but you can enter a not possible to give the \fBtime\fP argument, but you can enter a
explanatory message on the command line that will be sent to all users. explanatory message on the command line that will be sent to all users.
.\"}}} .\"}}}
.\"{{{ -t sec
.IP "\fB\-t\fP \fIsec\fP"
Tell \fBinit\fP(8) to wait \fIsec\fP seconds between sending processes the
warning and the kill signal, before changing to another runlevel.
.\"}}}
.\"{{{ time .\"{{{ time
.IP \fItime\fP .IP \fItime\fP
When to shutdown. When to shutdown.
.\"}}} .\"}}}
.\"{{{ warning-message .\"{{{ warning-message
.IP \fIwarning-message\fP .IP "\fIwarning message\fP"
Message to send to all users. Message to send to all users.
.\"}}} .\"}}}
.PP .PP

View File

@ -111,7 +111,7 @@ void stopit(int sig)
void usage(void) void usage(void)
{ {
fprintf(stderr, fprintf(stderr,
"Usage:\t shutdown [-akrhHPfnc] [-t secs] time [warning message]\n" "Usage:\t shutdown [-akrhPHfFnc] [-t sec] time [warning message]\n"
"\t\t -a: use /etc/shutdown.allow\n" "\t\t -a: use /etc/shutdown.allow\n"
"\t\t -k: don't really shutdown, only warn.\n" "\t\t -k: don't really shutdown, only warn.\n"
"\t\t -r: reboot after shutdown.\n" "\t\t -r: reboot after shutdown.\n"