Time is the time at which shutdown will bring the system down and may be the word now (indicating an immediate shutdown) or specify a future time in one of two formats: +number and hour:min. The first form brings the system down in number minutes and the second brings the system down at the time of day indicated (as a 24-hour clock).
At intervals which get closer together as apocalypse approaches, warning messages are displayed at the terminals of all users on the system. Five minutes before shutdown, or immediately if shutdown is in less than 5 minutes, logins are disabled by creating /etc/nologin and writing a message there. If this file exists when a user attempts to log in, login.1 prints its contents and exits. The file is removed just before shutdown exits.
At shutdown time a message is written in the system log, containing the time of shutdown, who ran shutdown and the reason. Then a terminate signal is sent to init to bring the system down to single-user state. Alternatively, if -r, -h, or -k was used, then shutdown will exec reboot.8 halt.8 or avoid shutting the system down (respectively). (If it isn't obvious, -k is to make people think the system is going down!)
The -n option prevents the normal sync.2 before stopping. The -p option causes the machine to be powered down if the -h option is also specified.
The time of the shutdown and the warning message are placed in /etc/nologin and should be used to inform the users about when the system will be back up and why it is going down (or anything else).
Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97