diff options
author | ru <ru@FreeBSD.org> | 1999-06-21 16:06:21 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 1999-06-21 16:06:21 +0000 |
commit | eba023799a120e4af79f68b707dd19fe36f7dee3 (patch) | |
tree | a049006b488cb1460e02471f854eb635c4c682b6 /sbin/shutdown/shutdown.8 | |
parent | 7cd92321bdeead71e46ed6abfcf4036b05e4d013 (diff) | |
download | FreeBSD-src-eba023799a120e4af79f68b707dd19fe36f7dee3.zip FreeBSD-src-eba023799a120e4af79f68b707dd19fe36f7dee3.tar.gz |
Signal init(8) instead of executing halt(8) or reboot(8)
when halting or rebooting the system. It benefits from
running /etc/rc.shutdown by init(8).
``-o'' flag is provided for backward compatibility.
PR: 5451
Discussed with: des
Diffstat (limited to 'sbin/shutdown/shutdown.8')
-rw-r--r-- | sbin/shutdown/shutdown.8 | 84 |
1 files changed, 48 insertions, 36 deletions
diff --git a/sbin/shutdown/shutdown.8 b/sbin/shutdown/shutdown.8 index 90041f5..876c287 100644 --- a/sbin/shutdown/shutdown.8 +++ b/sbin/shutdown/shutdown.8 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)shutdown.8 8.2 (Berkeley) 4/27/95 -.\" $Id: shutdown.8,v 1.9 1999/01/11 09:07:42 asami Exp $ +.\" $Id: shutdown.8,v 1.10 1999/06/21 06:21:04 jkoshy Exp $ .\" .Dd Dec 11, 1998 .Dt SHUTDOWN 8 @@ -40,8 +40,15 @@ .Nd "close down the system at a given time" .Sh SYNOPSIS .Nm shutdown -.Op Fl -.Op Fl hknpr +.Op Fl +.Oo +.Fl h | Fl p | +.Fl r | Fl k +.Oc +.Oo +.Fl o +.Op Fl n +.Oc .Ar time .Op Ar warning-message ... .Sh DESCRIPTION @@ -55,11 +62,15 @@ The following options are available: .Bl -tag -width indent .It Fl h The system is halted at the specified -.Ar time -when -.Nm -executes -.Xr halt 8 . +.Ar time . +.It Fl p +The system is halted and the power is turned off +.Pq hardware support required +at the specified +.Ar time . +.It Fl r +The system is rebooted at the specified +.Ar time . .It Fl k Kick everybody off. The @@ -67,21 +78,30 @@ The option does not actually halt the system, but leaves the system multi-user with logins disabled (for all but super-user). -.It Fl n -Prevent the normal -.Xr sync 2 -before stopping. -This option is ignored if -.Fl k -is specified. -.It Fl p -The system will turn the power off after shutdown if it can. -.It Fl r -.Nm Shutdown -executes +.It Fl o +If one of the +.Fl h , +.Fl p +or +.Fl r +is specified, +.Nm +will execute +.Xr halt 8 +or .Xr reboot 8 -at the specified -.Ar time . +instead of sending signal to +.Xr init 8 . +.It Fl n +If the +.Fl o +is specified, prevent the file system cache from being flushed by passing +.Fl n +option to +.Xr halt 8 +or +.Xr reboot 8 . +This option should probably not be used. .It Ar time .Ar Time is the time at which @@ -108,14 +128,6 @@ is supplied as an option, the warning message is read from the standard input. .El .Pp -Only one of -.Fl h , -.Fl k , -.Fl p , -and -.Fl r -can be specified at a time. -.Pp At intervals, becoming more frequent as apocalypse approaches and starting at ten hours before shutdown, warning messages are displayed on the terminals of all users logged in. Five minutes before @@ -131,13 +143,12 @@ removed just before .Nm exits. .Pp -At shutdown time a message is written in the system log, containing the -time of shutdown, who initiated the shutdown and the reason. -A terminate -signal is then sent to +At shutdown time a message is written to the system log, containing the +time of shutdown, the person who initiated the shutdown and the reason. +Corresponding signal is then sent to .Xr init 8 -to bring the system down to single-user state (depending on above -options). +to respectively halt, reboot or bring the system down to single-user state +(depending on the above options). The time of the shutdown and the warning message are placed in .Pa /var/run/nologin @@ -154,6 +165,7 @@ tells login not to let anyone log in .Xr wall 1 , .Xr nologin 5 , .Xr halt 8 , +.Xr init 8 , .Xr reboot 8 .Sh BACKWARD COMPATIBILITY The hours and minutes in the second time format may be separated by |