when running /etc/rc.shutdown, don't wait on it until it completes
indefinitely - by default, wait maximum of 300 seconds only the timeout is settable via new -T flag Adjust history to mention addition of shutdown hooks and -T option on manpage, also move description of -D further up and slighly adjust. This fixes bin/10637.
This commit is contained in:
parent
4badffe2c1
commit
94021a19a5
@ -1,4 +1,4 @@
|
|||||||
.\" $NetBSD: shutdown.8,v 1.17 1998/10/29 20:12:56 bad Exp $
|
.\" $NetBSD: shutdown.8,v 1.18 2000/07/20 17:33:57 jdolecek Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 1988, 1991, 1993
|
.\" Copyright (c) 1988, 1991, 1993
|
||||||
.\" The Regents of the University of California. All rights reserved.
|
.\" The Regents of the University of California. All rights reserved.
|
||||||
@ -33,7 +33,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" @(#)shutdown.8 8.2 (Berkeley) 4/27/95
|
.\" @(#)shutdown.8 8.2 (Berkeley) 4/27/95
|
||||||
.\"
|
.\"
|
||||||
.Dd January 20, 1998
|
.Dd July 20, 2000
|
||||||
.Dt SHUTDOWN 8
|
.Dt SHUTDOWN 8
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -42,6 +42,8 @@
|
|||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm
|
.Nm
|
||||||
.Op Fl Ddfhknpr
|
.Op Fl Ddfhknpr
|
||||||
|
.Op Fl T
|
||||||
|
.Ar timeout
|
||||||
.Ar time
|
.Ar time
|
||||||
.Op Ar message ... | Ar -
|
.Op Ar message ... | Ar -
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
@ -69,6 +71,13 @@ flags are specified, then
|
|||||||
.Fl d
|
.Fl d
|
||||||
also implies
|
also implies
|
||||||
.Fl r .
|
.Fl r .
|
||||||
|
.It Fl D
|
||||||
|
Prevents
|
||||||
|
.Nm
|
||||||
|
from detaching from the tty with
|
||||||
|
.Xr fork 2
|
||||||
|
and
|
||||||
|
.Xr exit 3 .
|
||||||
.It Fl f
|
.It Fl f
|
||||||
.Nm
|
.Nm
|
||||||
arranges, in the manner of
|
arranges, in the manner of
|
||||||
@ -110,12 +119,12 @@ when
|
|||||||
.Nm
|
.Nm
|
||||||
execs
|
execs
|
||||||
.Xr reboot 8 .
|
.Xr reboot 8 .
|
||||||
.It Fl D
|
.It Fl T
|
||||||
Prevents
|
Timeout in seconds to wait for
|
||||||
.Nm
|
.Pa /etc/rc.shutdown
|
||||||
from detaching from the tty with
|
to finish. After
|
||||||
.Xr fork 2 /
|
this period, the script is killed and system shutdown proceeds.
|
||||||
.Xr exit 3 .
|
Default is 300 seconds (5 minutes).
|
||||||
.It Ar time
|
.It Ar time
|
||||||
.Ar Time
|
.Ar Time
|
||||||
is the time at which
|
is the time at which
|
||||||
@ -169,8 +178,12 @@ time of shutdown, who initiated the shutdown and the reason.
|
|||||||
Next a message is printed announcing the start of the system shutdown hooks.
|
Next a message is printed announcing the start of the system shutdown hooks.
|
||||||
Then the shutdown hooks in
|
Then the shutdown hooks in
|
||||||
.Pa /etc/rc.shutdown
|
.Pa /etc/rc.shutdown
|
||||||
are run.
|
are run. If they don't complete within timeout (see
|
||||||
And a message is printed indicating that they have completed.
|
.Fl T ,
|
||||||
|
default 5 minutes), the script is killed and
|
||||||
|
.Nm
|
||||||
|
proceeds with system shutdown.
|
||||||
|
In either case, a message is printed indicating that they have completed.
|
||||||
After a short delay a terminate
|
After a short delay a terminate
|
||||||
signal is then sent to
|
signal is then sent to
|
||||||
.Xr init 8
|
.Xr init 8
|
||||||
@ -204,3 +217,9 @@ The
|
|||||||
.Nm
|
.Nm
|
||||||
command appeared in
|
command appeared in
|
||||||
.Bx 4.0 .
|
.Bx 4.0 .
|
||||||
|
Running of shutdown hooks in
|
||||||
|
.Pa /etc/rc.shutdown
|
||||||
|
and
|
||||||
|
.Fl T
|
||||||
|
option have been added in
|
||||||
|
.Nx 1.5 .
|
||||||
|
Loading…
Reference in New Issue
Block a user