| BSD version | Windows |
Linux version:
/sbin/shutdown [-t sec] [-arkhncfFHP]
time†
[message]
message and logins are disabled.
SIGTERM.
This gives programs like editors the time to save the file
being edited, mail and news processing programs a chance to exit cleanly, etc.
SIGKILL to all processes
/etc/inittab defines what action is taken for halt or reboot.
-c |
/etc/nologin is created if shutdown is called with a delay.
This causes programs such as login to deny logins.
Shutdown removes this file if it is stopped before it signals init (i.e. it is cancelled or something goes wrong).
Shutdown removes /etc/nologin before calling init to change the runlevel.
CTRL-ALT-DEL are pressed,
by creating an appropriate entry in /etc/inittab.
This means that everyone who has physical access
to the console keyboard can shut the system down.
To prevent this, shutdown can check to see
if an authorized user is logged in on one of the virtual consoles.
If shutdown is called with -a
(add this to the invocation of shutdown in /etc/inittab),
it checks to see if the file /etc/shutdown.allow is present.
It then compares the login names in that file with the list of people that are
logged in on a virtual console (from /var/run/utmp).
Only if one of those authorized users or root is logged in, it will proceed. Otherwise it will write the message
shutdown: no authorized users logged in
to the (physical) system console. /etc/shutdown.allow is one user name per line.
Empty lines and comment lines (prefixed by a #) are allowed.
There is a limit of 32 users in this file.
Note that if /etc/shutdown.allow is not present, the -a is ignored.
-H option just sets the init environment variable INIT_HALT to HALT, and
the -P just sets that variable to POWEROFF.
The shutdown script that calls halt as the last
thing in the shutdown sequence should check these environment variables and call halt
with the right options for these options to actually have any effect.
Debian 3.1 (sarge) supports this.
/fastboot
/etc/inittab
/etc/init.d/halt
/etc/init.d/reboot
/etc/shutdown.allow
The time argument is mandatory
Pressing [CTRL]-[ALT]-[DEL] will start shutdown from a console
in text mode.
If the console is running a window System, the windows server processes key strokes and processing of [CTRL]-[ALT]-[DEL] is server dependent.
Shutdown wasn't designed to be run setuid.
/etc/shutdown.allow is not used to find out who
is executing shutdown, it ONLY checks who is currently logged in on (one of the) console(s).
BSD
-h halt -n If -o is specified, prevent the file system cache from being flushed by passing -n option to halt or reboot. This option should not be used.
*** System shutdown message from username@host.domainName ***
Starting at no more than 10 hours before shutdown, at intervals becoming more frequent
5 minutes before shutdown, or immediately if shutdown is in less than 5 minutes,
the message is copied to
At
A scheduled shutdown can be canceled by reporting {
FILES
SEE ALSO kill(1), login(1), wall(1), nologin(5), halt(8), init(8), reboot(8)
The hours and minutes may be separated by a BSD December 11, 1998 BSD |
shutdown [/i ]
Reasons on this computer: (E = Expected U = Unexpected P = planned, C = customer defined) Type Major Minor Title EU 0 0 Other (Unplanned) E P 0 0 Other (Planned) U 0 5 Other Failure: System Unresponsive E P 1 1 Hardware: Maintenance (Unplanned) E P 1 2 Hardware: Installation (Planned) E P 2 2 Operating System: Recovery (Planned) P 2 3 Operating System: Upgrade (Planned) E P 2 4 Operating System: Reconfiguration (Planned) P 2 16 Operating System: Service pack (Planned) P 2 17 Operating System: Hot fix (Planned) P 2 18 Operating System: Security fix (Planned) E P 4 1 Application: Maintenance (Planned) E P 4 2 Application: Installation (Planned) E 4 5 Application: Unresponsive E 4 6 Application: Unstable U 5 15 System Failure: Stop error EUP 5 19 Security issue E 5 20 Loss of network connectivity (Unplanned) U 6 11 Power Failure: Cord Unplugged U 6 12 Power Failure: Environment P 7 0 Legacy API shutdown |