1 .\" $NetBSD: shutdown.8,v 1.27 2008/02/09 04:09:22 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
116 from detaching from the tty with
123 will bring the system down and
126 or a future time in one of two formats:
129 .Ar [[[[[cc]yy]mm]dd]hh]mm ,
130 where the century, year, month, day, and hour may be defaulted
131 to the current system values.
132 The first form brings the system down
134 minutes from the current time; the second brings the system down at the
135 absolute time specified.
136 If the century is not specified, it defaults to 1900 for years between 69
137 and 99, or 2000 for years between 0 and 68.
138 A leading zero in the
144 Any other arguments comprise the warning message that is broadcast
145 to users currently logged into the system.
149 is supplied as the only argument after the time, the warning message is read
150 from the standard input.
154 At intervals, becoming more frequent as apocalypse approaches
155 and starting at ten hours before shutdown, warning messages are displayed
156 on the terminals of all users logged in.
157 Five minutes before shutdown, or immediately if shutdown is in less
158 than 5 minutes, logins are disabled by creating
160 and copying the warning message there.
161 If this file exists when a user attempts to log in,
163 prints its contents and exits.
164 The file is removed just before
168 At shutdown time, a message is written in the system log containing the
169 time of shutdown, who initiated the shutdown, and the reason.
170 Next a message is printed announcing the start of the system shutdown hooks.
171 Then the shutdown hooks in
173 are run, and a message is printed indicating that they have completed.
183 to bring the system down to single-user mode, depending on the choice
186 The time of the shutdown and the warning message are placed in
188 and should be used to tell the users why the system is
189 going down, when it will be back up, and to share any other pertinent
192 .Bl -tag -width /etc/rc.shutdown -compact
196 not to let anyone log in
203 .It Pa /etc/rc.shutdown
204 System shutdown commands
215 .Sh BACKWARD COMPATIBILITY
216 The hours and minutes in the second time format may be separated by
217 a colon (``:'') for backward compatibility.