Linux Standard Base Core Specification 3.2 | ||
---|---|---|
<<< Previous | Next >>> |
The shutdown command
shall shut the system down in a secure way (first synopsis), or cancel
a pending shutdown (second synopsis).
When the shutdown is initiated, all logged-in users
shall be notified immediately that the system is going down, and users shall be
prevented from logging in to the system.
The time specifies when the actual
shutdown shall commence. See below for details. At the specified time
all processes are first notified that the system is
going down by the signal SIGTERM
. After an interval
(see -t) all processes shall be sent the signal
SIGKILL
.
If neither the -h or the
-r argument is specified, then the default behavior
shall be to take the system to a runlevel where administrative tasks can
be run. See also Run Levels.
Note: This is sometimes referred to as "single user mode".
The -h and -r options are mutually exclusive. If either the -h or -r options are specified, the system shall be halted or rebooted respectively.
If the shutdown utility is invoked with the -a option, it shall check that an authorized user is currently logged in on the system console. Authorized users are listed, one per line, in the file /etc/shutdown.allow. Lines in this file that begin with a '#' or are blank shall be ignored.
Note: The intent of this scheme is to allow a keyboard sequence entered on the system console (e.g. CTRL-ALT-DEL, or STOP-A) to automatically invoke shutdown -a, and can be used to prevent unauthorized users from shutting the system down in this fashion.