Commit | Line | Data |
---|---|---|
7ead89cf KM |
1 | .\" Copyright (c) 1980 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
cccdca83 | 5 | .\" @(#)shutdown.8 5.1 (Berkeley) %G% |
7ead89cf | 6 | .\" |
cccdca83 | 7 | .TH SHUTDOWN 8 4/1/83 |
7ead89cf KM |
8 | .UC 4 |
9 | .SH NAME | |
10 | shutdown \- close down the system at a given time | |
11 | .SH SYNOPSIS | |
12 | .B /etc/shutdown | |
13 | [ | |
14 | .B \-k | |
15 | ] [ | |
16 | .B \-r | |
17 | ] [ | |
18 | .B \-h | |
19 | ] | |
20 | time [ warning-message ... ] | |
21 | .SH DESCRIPTION | |
22 | .I Shutdown | |
23 | provides an automated shutdown procedure which a super-user | |
24 | can use to notify users | |
25 | nicely when the system is shutting down, saving them from | |
26 | system administrators, hackers, and gurus, who would otherwise | |
27 | not bother with niceties. | |
28 | .LP | |
29 | .I Time | |
30 | is the time at which | |
31 | .I shutdown | |
32 | will bring the system down and | |
cccdca83 KM |
33 | may be the word |
34 | .B now | |
35 | (indicating an immediate shutdown) | |
36 | or specify a future time in one of two formats: | |
7ead89cf KM |
37 | .BR + number |
38 | and | |
39 | .RB hour : min. | |
40 | The first form brings the system down in | |
41 | .I number | |
42 | minutes | |
43 | and the second brings the system down at the time of day indicated | |
44 | (as a 24\-hour clock). | |
45 | .PP | |
46 | At intervals which get closer together as apocalypse approaches, | |
47 | warning messages are displayed at the terminals of all users on the | |
48 | system. Five minutes before shutdown, or immediately if | |
49 | shutdown is in less than 5 minutes, logins are disabled by | |
50 | creating | |
51 | /etc/nologin | |
52 | and writing a message there. | |
cccdca83 | 53 | If this file exists when a user attempts to log in, |
7ead89cf KM |
54 | .IR login (1) |
55 | prints its contents | |
56 | and exits. | |
57 | The file is removed just before | |
58 | .I shutdown | |
59 | exits. | |
60 | .PP | |
61 | At shutdown time a | |
62 | message is written in the file /usr/adm/shutdownlog, containing the | |
63 | time of shutdown, who ran shutdown and the reason. | |
64 | Then a terminate signal is sent at | |
65 | .I init | |
66 | to bring the system down to single-user state. | |
67 | Alternatively, if | |
cccdca83 KM |
68 | .B \-r, |
69 | .B \-h, | |
7ead89cf | 70 | or |
cccdca83 | 71 | .B \-k |
7ead89cf KM |
72 | was used, then |
73 | .I shutdown | |
74 | will exec | |
75 | .IR reboot (8), | |
76 | .IR halt (8), | |
77 | or avoid shutting the system down (respectively). | |
78 | (If it isn't obvious, | |
79 | .B \-k | |
80 | is to make people | |
81 | .I think | |
82 | the system is going down!) | |
83 | .PP | |
84 | The time of the shutdown and the warning message | |
85 | are placed in /etc/nologin and should be used to | |
86 | inform the users about when the system will be back up | |
87 | and why it is going down (or anything else). | |
88 | .SH FILES | |
89 | .DT | |
90 | /etc/nologin tells login not to let anyone log in | |
91 | .br | |
cccdca83 | 92 | /usr/adm/shutdownlog log file for successful shutdowns. |
7ead89cf KM |
93 | .SH "SEE ALSO" |
94 | login(1), reboot(8) | |
95 | .SH BUGS | |
96 | Only allows you to kill the system between now and 23:59 if | |
97 | you use the absolute time for shutdown. |