]>
Commit | Line | Data |
---|---|---|
1815bff5 A |
1 | .\" Copyright (c) 1988, 1991, 1993 |
2 | .\" The Regents of the University of California. All rights reserved. | |
3 | .\" | |
4 | .\" Redistribution and use in source and binary forms, with or without | |
5 | .\" modification, are permitted provided that the following conditions | |
6 | .\" are met: | |
7 | .\" 1. Redistributions of source code must retain the above copyright | |
8 | .\" notice, this list of conditions and the following disclaimer. | |
9 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
10 | .\" notice, this list of conditions and the following disclaimer in the | |
11 | .\" documentation and/or other materials provided with the distribution. | |
12 | .\" 3. All advertising materials mentioning features or use of this software | |
13 | .\" must display the following acknowledgement: | |
14 | .\" This product includes software developed by the University of | |
15 | .\" California, Berkeley and its contributors. | |
16 | .\" 4. Neither the name of the University nor the names of its contributors | |
17 | .\" may be used to endorse or promote products derived from this software | |
18 | .\" without specific prior written permission. | |
19 | .\" | |
20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
30 | .\" SUCH DAMAGE. | |
31 | .\" | |
32 | .\" @(#)shutdown.8 8.2 (Berkeley) 4/27/95 | |
33 | .\" | |
34 | .Dd April 27, 1995 | |
35 | .Dt SHUTDOWN 8 | |
36 | .Os BSD 4 | |
37 | .Sh NAME | |
38 | .Nm shutdown | |
39 | .Nd "close down the system at a given time" | |
40 | .Sh SYNOPSIS | |
41 | .Nm shutdown | |
42 | .Op Fl | |
43 | .Op Fl fhkrn | |
44 | .Ar time | |
45 | .Op Ar warning-message ... | |
46 | .Sh DESCRIPTION | |
47 | .Nm Shutdown | |
48 | provides an automated shutdown procedure for super-users | |
49 | to nicely notify users when the system is shutting down, | |
50 | saving them from system administrators, hackers, and gurus, who | |
51 | would otherwise not bother with such niceties. | |
52 | .Pp | |
53 | Available friendlinesses: | |
54 | .Bl -tag -width time | |
55 | .It Fl f | |
56 | .Nm Shutdown | |
57 | arranges, in the manner of | |
58 | .Xr fastboot 8 , | |
59 | for the file systems | |
60 | .Em not to be | |
61 | checked on reboot. | |
62 | .It Fl h | |
63 | The system is halted at the specified | |
64 | .Ar time | |
65 | when | |
66 | .Nm shutdown | |
67 | execs | |
68 | .Xr halt 8 . | |
69 | .It Fl k | |
70 | Kick everybody off. | |
71 | The | |
72 | .Fl k | |
73 | option | |
74 | does not actually halt the system, but leaves the | |
75 | system multi-user with logins disabled (for all but super-user). | |
76 | .It Fl n | |
77 | Prevent the normal | |
78 | .Xr sync 2 | |
79 | before stopping. | |
80 | .It Fl r | |
81 | .Nm Shutdown | |
82 | execs | |
83 | .Xr reboot 8 | |
84 | at the specified | |
85 | .Ar time . | |
86 | .It Ar time | |
87 | .Ar Time | |
88 | is the time at which | |
89 | .Nm shutdown | |
90 | will bring the system down and | |
91 | may be the word | |
92 | .Ar now | |
93 | (indicating an immediate shutdown) or | |
94 | specify a future time in one of two formats: | |
95 | .Ar +number , | |
96 | or | |
97 | .Ar yymmddhhmm , | |
98 | where the year, month, and day may be defaulted | |
99 | to the current system values. The first form brings the system down in | |
100 | .Ar number | |
101 | minutes and the second at the absolute time specified. | |
102 | .It Ar warning-message | |
103 | Any other arguments comprise the warning message that is broadcast | |
104 | to users currently logged into the system. | |
105 | .It Fl | |
106 | If | |
107 | .Ql Fl | |
108 | is supplied as an option, the warning message is read from the standard | |
109 | input. | |
110 | .El | |
111 | .Pp | |
112 | At intervals, becoming more frequent as apocalypse approaches | |
113 | and starting at ten hours before shutdown, warning messages are displayed | |
114 | on the terminals of all users logged in. Five minutes before | |
115 | shutdown, or immediately if shutdown is in less than 5 minutes, | |
116 | logins are disabled by creating | |
117 | .Pa /etc/nologin | |
118 | and copying the | |
119 | warning message there. If this file exists when a user attempts to | |
120 | log in, | |
121 | .Xr login 1 | |
122 | prints its contents and exits. The file is | |
123 | removed just before | |
124 | .Nm shutdown | |
125 | exits. | |
126 | .Pp | |
127 | At shutdown time a message is written in the system log, containing the | |
128 | time of shutdown, who initiated the shutdown and the reason. | |
129 | A terminate | |
130 | signal is then sent to | |
131 | .Xr init | |
132 | to bring the system down to single-user state (depending on above | |
133 | options). | |
134 | The time of the shutdown and the warning message | |
135 | are placed in | |
136 | .Pa /etc/nologin | |
137 | and should be used to | |
138 | inform the users about when the system will be back up | |
139 | and why it is going down (or anything else). | |
140 | .Sh FILES | |
141 | .Bl -tag -width /etc/nologin -compact | |
142 | .It Pa /etc/nologin | |
143 | tells login not to let anyone log in | |
144 | .It Pa /fastboot | |
145 | tells | |
146 | .Xr rc 8 | |
147 | not to run fsck when rebooting | |
148 | .El | |
149 | .Sh SEE ALSO | |
150 | .Xr login 1 , | |
151 | .Xr wall 1 , | |
152 | .Xr fastboot 8 , | |
153 | .Xr halt 8 , | |
154 | .Xr reboot 8 | |
155 | .Sh BACKWARD COMPATIBILITY | |
156 | The hours and minutes in the second time format may be separated by | |
157 | a colon (``:'') for backward compatibility. | |
158 | .Sh HISTORY | |
159 | The | |
160 | .Nm | |
161 | command appeared in | |
162 | .Bx 4.0 . |