Frysinger and Gentoo.
git-svn-id: svn://svn.sv.gnu.org/sysvinit/sysvinit/trunk@16
456724a4-4300-0410-8514-
c89748c515a2
* Add Makefile in toplevel directory.
* Print usage information when shutdown is used by non-root user.
Patch from Mike Frysinger and Gentoo.
* Add Makefile in toplevel directory.
* Print usage information when shutdown is used by non-root user.
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
.\"{{{ Synopsis
.SH SYNOPSIS
.B /sbin/shutdown
.\"{{{ Synopsis
.SH SYNOPSIS
.B /sbin/shutdown
+.RI [ "warning message" ]
.\"}}}
.\"{{{ Description
.SH DESCRIPTION
.\"}}}
.\"{{{ Description
.SH DESCRIPTION
.IP "\fB\-a\fP
Use \fB/etc/shutdown.allow\fP.
.\"}}}
.IP "\fB\-a\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
.IP \fB\-k\fP
Don't really shutdown; only send the warning messages to everybody.
.\"{{{ -k
.IP \fB\-k\fP
Don't really shutdown; only send the warning messages to everybody.
.IP \fB\-h\fP
Halt or power off after shutdown.
.\"}}}
.IP \fB\-h\fP
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
.IP \fB\-P\fP
Halt action is to turn off the power.
.\"}}}
.\"{{{ -P
.IP \fB\-P\fP
Halt action is to turn off the power.
.\"}}}
-.\"{{{ -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.
+.\"{{{ -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.
.\"}}}
.\"{{{ -f
.IP \fB\-f\fP
.\"}}}
.\"{{{ -f
.IP \fB\-f\fP
.IP \fB\-F\fP
Force fsck on reboot.
.\"}}}
.IP \fB\-F\fP
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
.IP \fB\-c\fP
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
explanatory message on the command line that will be sent to all users.
.\"}}}
.\"{{{ -c
.IP \fB\-c\fP
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
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
.IP \fItime\fP
When to shutdown.
.\"}}}
.\"{{{ warning-message
.\"{{{ time
.IP \fItime\fP
When to shutdown.
.\"}}}
.\"{{{ warning-message
-.IP \fIwarning-message\fP
+.IP "\fIwarning message\fP"
Message to send to all users.
.\"}}}
.PP
Message to send to all users.
.\"}}}
.PP
void usage(void)
{
fprintf(stderr,
void usage(void)
{
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 -k: don't really shutdown, only warn.\n"
"\t\t -r: reboot after shutdown.\n"
"\t\t -a: use /etc/shutdown.allow\n"
"\t\t -k: don't really shutdown, only warn.\n"
"\t\t -r: reboot after shutdown.\n"