|SHUTDOWN(8)||Maintenance Commands and Procedures||SHUTDOWN(8)|
/usr/sbin/shutdown [-y] [-g grace-period] [-i init-state] [message]
shutdown is executed by the super user to change the state of the machine. In most cases, it is used to change from the multi-user state (state 2) to another state.
By default, shutdown brings the system to a state where only the console has access to the operating system. This state is called single-user.
Before starting to shut down daemons and killing processes, shutdown sends a warning message and, by default, a final message asking for confirmation. message is a string that is sent out following the standard warning message "The system will be shut down in ..." If the string contains more than one word, it should be contained within single (') or double (") quotation marks.
The warning message and the user provided message are output when there are 7200, 3600, 1800, 1200, 600, 300, 120, 60, and 30 seconds remaining before shutdown begins. See EXAMPLES.
System state definitions are:
state s, S
In the following example, shutdown is being executed on host foo and is scheduled in 120 seconds. The warning message is output 2 minutes, 1 minute, and 30 seconds before the final confirmation message.
example# shutdown -i S -g 120 "===== disk replacement =====" Shutdown started. Tue Jun 7 14:51:40 PDT 1994 Broadcast Message from root (pts/1) on foo Tue Jun 7 14:51:41... The system will be shut down in 2 minutes ===== disk replacement ===== Broadcast Message from root (pts/1) on foo Tue Jun 7 14:52:41... The system will be shut down in 1 minutes ===== disk replacement ===== Broadcast Message from root (pts/1) on foo Tue Jun 7 14:53:41... The system will be shut down in 30 seconds ===== disk replacement ===== Do you want to continue? (y or n):
When a system transitions down to the S or s state, the /etc/nologin file (see nologin(5)) is created. Upon subsequent transition to state 2 (multi-user state), this file is removed by a script in the /etc/rc2.d directory.
|May 9, 2001||OmniOS|