SHUTDOWN(8) BSD SHUTDOWN(8)
NAME
shutdown - close down the system at a given time
SYNOPSIS
/etc/shutdown [ -k ] [ -r ] [ -h ] [ -n ] time [ warning-message ... ]
DESCRIPTION
shutdown provides an automated shutdown procedure with which to notify
users when a system (node) is shutting down. You must have root
privileges to run shutdown.
time is the time at which shutdown will bring the system down and may be
the word now (indicating an immediate shutdown) or may specify a future
time in one of two formats: +number and hour:min. The first form brings
the system down in number minutes; the second brings the system down at
the time of day indicated (as a 24-hour clock).
At intervals which get closer together as the shutdown approaches,
warning messages appear on the terminals of all users on the system.
Five minutes before shutdown, or immediately if shutdown is in less than
5 minutes, shutdown creates the /etc/nologin file to disable further
logins and writes a message there. If this file exists when a user
attempts to log in, login(1) prints the file's contents and exits. The
/etc/nologin file is removed just before shutdown exits.
At shutdown time, a message containing the time of shutdown, who ran
shutdown, and the reason for shutting down is placed in the system log.
Then a terminate signal is sent to init to bring the system down to
single-user state.
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).
On diskless nodes, shutdown works slightly differently. If the file
/etc/nologin exists, shutdown assumes that the mother node is shutting
down and doesn't bother to rewrite the shutdown message.
If /etc/nologin doesn't exist, the diskless node writes its message in
`node_data/etc/nologin, then links /etc/nologin to
`node_data/etc/nologin. That way, logins are not disabled on the mother
node or any of her other diskless children.
On diskless nodes, shutdown removes only `node_data/etc/nologin when it
exits. On disked nodes, shutdown removes only /etc/nologin when it
exits.
OPTIONS
-r Execute reboot(8). This option causes a full reboot of the system.
Hardware self-tests are run, then the system software brings itself
back up to the login: message.
-h Execute halt(8). This option brings the system down to the Mnemonic
Debugger (MD).
-k Send all warning messages, but don't actually shut the system down.
-n Prevent the normal sync(2) before stopping.
The -f option, which is supported by 4.3BSD, is not supported by
Domain/OS BSD.
FILES
/etc/nologin tells login not to let anyone log in
BUGS
Only allows you to kill the system between now and 23:59 if you use the
hour:min format to specify the time for shutdown.
SEE ALSO
login(1), reboot(8), halt(8)