SHUTDOWN(8)
NAME
shutdown − close down the system at a given time
SYNTAX
/etc/shutdown [ −k ] [ −r ] [ −h ] [ −o ] time [ warning-message ... ]
DESCRIPTION
Shutdown provides an automated shutdown procedure which a super user can use to notify users when the system is shutting down.i
Time is the time at which shutdown will bring the system down. It may be the word now , indicating an immediate shutdown, or specify a future time in one of two formats: +number or hour:min. The first form brings the system down in number minutes. The second brings the system down at the time of day indicated, using a 24−hour clock format.
At intervals which get shorter as shutdown nears, warning messages are displayed at the terminals of all users on the system. Five minutes before shutdown, or immediately if shutdown is timed for less than five minutes, logins are disabled by creating /etc/nologin and writing a message there. If this file exists when a user attempts to log in, login(1) 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. This message contains the time of shutdown, who ran shutdown and the reason. Then, a terminate signal is sent at init to bring the system to single-user state.
If −r, −h, or −k, then shutdown executes reboot(8), halt(8), or avoids shutting the system down (respectively). The −o option is for use by opser only. It indicates to shutdown that it is being called by opser and not to return to the user.
You should place the time of the shutdown and the warning message in /etc/nologin. Use the message to inform the users about when the system will be back up and why it is going down.
FILES
/etc/nologintells login not to let anyone log in
/usr/adm/shutdownloglog file for successful shutdowns.
RESTRICTIONS
You can kill the system only between now and 23:59, if you use the absolute time for shutdown.