1 .\" $NetBSD: shutdown.8,v 1.31 2011/10/04 07:25:34 dholland Exp $
3 .\" Copyright (c) 1988, 1991, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)shutdown.8 8.2 (Berkeley) 4/27/95
37 .Nd close down the system at a given time
43 .Op Ar message ... | Ar -
46 provides an automated shutdown procedure for super-users
47 to nicely notify users when the system is shutting down,
48 saving them from system administrators, hackers, and gurus, who
49 would otherwise not bother with such niceties.
51 Available friendlinesses:
52 .Bl -tag -width bootstr
58 for the benefit of those systems that can pass boot arguments to the
60 Currently, this only affects sun3 and sparc machines.
69 to request a kernel core dump.
74 flags are specified, then
80 arranges, in the manner of
86 The system is halted at the specified
95 does not actually halt the system, but leaves the
96 system multi-user with logins disabled (for all but super-user).
102 The system is powered down at the specified
106 If the powerdown fails, or the system does not support software powerdown,
107 the system will simply halt instead.
109 The system is rebooted at the specified
114 To enable verbose messages on the console, pass
121 To enable debugging messages on the console, pass
128 To silence some shutdown messages on the console, pass
137 from detaching from the tty with
144 will bring the system down and
147 or a future time in one of two formats:
150 .Ar [[[[[cc]yy]mm]dd]hh]mm ,
151 where the century, year, month, day, and hour may be defaulted
152 to the current system values.
153 The first form brings the system down
155 minutes from the current time; the second brings the system down at the
156 absolute time specified.
157 If the century is not specified, it defaults to 1900 for years between 69
158 and 99, or 2000 for years between 0 and 68.
159 A leading zero in the
165 Any other arguments comprise the warning message that is broadcast
166 to users currently logged into the system.
170 is supplied as the only argument after the time, the warning message is read
171 from the standard input.
175 At intervals, becoming more frequent as apocalypse approaches
176 and starting at ten hours before shutdown, warning messages are displayed
177 on the terminals of all users logged in.
178 Five minutes before shutdown, or immediately if shutdown is in less
179 than 5 minutes, logins are disabled by creating
181 and copying the warning message there.
182 If this file exists when a user attempts to log in,
184 prints its contents and exits.
185 The file is removed just before
189 At shutdown time, a message is written in the system log containing the
190 time of shutdown, who initiated the shutdown, and the reason.
191 Next a message is printed announcing the start of the system shutdown hooks.
192 Then the shutdown hooks in
194 are run, and a message is printed indicating that they have completed.
204 to bring the system down to single-user mode, depending on the choice
207 The time of the shutdown and the warning message are placed in
209 and should be used to tell the users why the system is
210 going down, when it will be back up, and to share any other pertinent
213 .Bl -tag -width /etc/rc.shutdown -compact
217 not to let anyone log in
224 .It Pa /etc/rc.shutdown
225 System shutdown commands
236 .Sh BACKWARD COMPATIBILITY
237 The hours and minutes in the second time format may be separated by
238 a colon (``:'') for backward compatibility.