Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

login(1)

reboot(8)

rc(8)

init(8)

halt(8)

SHUTDOWN(8)  —  UNIX Programmer’s Manual

NAME

shutdown − close down the system at a given time

SYNOPSIS

/etc/shutdown [−k] [−r] [−h] time [warning-message ...]

DESCRIPTION

The shutdown command provides an automated shutdown procedure for the superuser to notify users when the system is shutting down.  The time argument specifies when shutdown will bring the system down; it may be the word now (indicating an immediate shutdown), or it may specify a future time in one of two formats: +number and hour:minute.  The first form brings the system down in number minutes, and the second brings the system down at the time of day indicated in 24-hour notation. 

At intervals that get closer as the system shutdown approaches, warning messages are displayed at terminals of all logged-in users, and of users who have remote mounts on that machine.  Five minutes before shutdown, or immediately if shutdown is in less than 5 minutes, logins are disabled by creating the file /etc/nologin and writing a message there.  If this file exists when a user attempts to log in, login prints its contents and exits.  The file is removed just before shutdown exits. 

At shutdown time, a message is written in the file /usr/adm/shutdownlog, containing the time of shutdown, the instigator of the shutdown, and the reason. The script /etc/rc.shutdown is called with the argument warn. All processes except system processes and shutdown are sent a terminate signal. A terminal stop signal is sent to init, so that processes are not respawned as they die.  Next, shutdown sends all remaining non-system processes a kill signal, then calls /etc/rc.shutdown with the argument shutdown. Finally, it sends a terminate signal to init, which brings the system down to single-user mode. 

The time of the shutdown and the warning message are placed in the file /etc/nologin, which should be used to tell the users when the system will be back up, and why it is going down.

OPTIONS

As an alternative to the above procedure, these options can be specified:

−r Execute reboot instead of entering single-user mode. 

−h Execute halt instead of entering single-user mode. 

−k Make people think the system is going down, but do not actually take it down. 

FILES

/etc/nologin tells login not to let anyone log in
/etc/rmtab list of remote hosts that have mounted this host
/usr/adm/shutdownlog log file for successful shutdowns
/etc/rc.shutdown system shutdown script

SEE ALSO

login(1), reboot(8), rc(8), init(8), halt(8)

BUGS

Only allows you to kill the system between now and 23:59 if you use the absolute time for shutdown. 

4BSD

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026