66
www.obarun.org
66-shutdown
66-shutdown triggers the system shutdown procedure. It is normally invoked as shutdown at your binary system directory. This program is a modified copy of s6-linux-init-shudown program.
Interface
66-shutdown [ -H ] [ -l live ] [ -h | -p | -r | -k ] [ -a ] [ -t sec ] [ -f | -F ] time [ message ]
66-shutdown -c [ message ]
- If the -c option is present, a pending shutdown is cancelled.
- Else, it plans the shutdown procedure at time time.
- If a message argument has been given, message is
broadcast to all logged in users (as tracked by utmp).
- shutdown exits 0. The shutdown procedure happens asynchronously.
The 66-shutdown program conforms to the LSB-3.0.0
shutdown
interface.
time must follow the following format:
[ now | [+]mins | hh:mm ]
- now means: trigger the shutdown sequence immediately.
- hh:mm means: absolute time. Trigger the shutdown sequence when the time
hh:mm occurs. If that time has passed for the day, it will wait for the
next day. hh must have 1 or 2 digits; mm must have 2 digits.
- mins or +mins means: relative time. Trigger the shutdown
sequence after mins minutes.
Options
-
-H : prints this help.
-
-l live : live directory to use. 66-shutdown sends signal the pipe of the 66-shutdownd service at live/scandir/0/shutdownd/fifo. Default is
/run/66. The default can also be changed at compile-time by
passing the --livedir=live option to ./configure.
An absolute path is expected and should be under a writable filesystem
- likely a RAM filesystem.
-
-a : access control. The shutdown sequence will only be
launched if one of the users listed in /etc/shutdown.allow
is currently logged in (as tracked by utmp). /etc/shutdown.allow
is a text file, one user per line, lines starting with # are comments.
-
-t sec : at the end of the shutdown sequence,
when it's time to kill all processes, have a "grace time" period
of sec seconds between the SIGTERM and the SIGKILL (to allow processes
receiving SIGTERM to exit cleanly). Default is 3 seconds.
-
-k : warning only. message will be sent to all
logged in users, but the shutdown sequence will not be triggered.
-
-h : at the end of the shutdown sequence, halt the system.
-
-p : at the end of the shutdown sequence, power off the system.
(This option is provided as an extension, it is not required by the LSB interface.)
-
-r : at the end of the shutdown sequence, reboot the system.
-
-f : ignored.
-
-F : ignored.
-
-c l: cancel a planned shutdown (i.e. cancel the effect of a
previous call to shutdown with a time argument that was not now).
This cannot be used to interrupt a shutdown sequence that has already started.
Notes
-
The 66-shutdown binary is not meant to be called directly by administrators. Instead, use the shutdown skel file installed by default at /etc/66 directory. This should be copied or symlinked by the administrator into the binary directory of your system.
-
The -f and -F options are only accepted for compatibility. LSB says they are used to advise the system to skip or enforce a fsck after rebooting. But they are only advisory, and for decades now systems have used other methods of evaluating whether they should perform filesystem checks, so these options are largely obsolete nowadays.