66-shutdownd¶
The daemon that manages the shutdown procedure for a 66 boot initialization. It is not meant to be called directly and automatically generated by a 66 scandir create|start command invocation.
This program is a modified copy of s6-linux-init-shudownd.
Interface¶
66-shutdownd [ -h ] [ -l live ] [ -s skel ] [ -g gracetime ] [ -B ] [ -c ]
-
66-shutdownd opens the
/run/66/scandir/0/shutdownd/fifopipe and listens to it. Programs such as 66-shutdown send their commands to this pipe when they are told to trigger the shutdown procedure. -
When it receives a command to shut down 66-shutdownd parses the skel file
rc.init—defined by default at/etc/66directory— and reads the value ofRCSHUTDOWNto be able to spawn therc.shutdownscript. -
When said script exits 66-shutdownd kills all processes first with a
SIGTERMthen, after the grace time specified by the shutdown command, with aSIGKILL. -
It then runs an automatically generated script called
stage4which unmounts all file systems and halts, powers off or reboots the machine.
Options¶
-
-h: prints this help.
-
-l live: changes the supervision directory of service to live. By default this will be
/run/66. The default can also be changed at compile time by passing the--livedir=liveoption to./configure. An existing absolute path is expected and should be within a writable and executable filesystem - likely a RAM filesystem—see 66 scandir. -
-s skel: an absolute path; directory of the skeleton file
rc.init. Default is/etc/66. -
-g gracetime: specify a grace time between the
SIGTERMand theSIGKILLin milliseconds if the shutdown command does not provide one. Defaults to3000. -
-B: inform the shutdown daemon that it is running in a container. This changes the nature of stage 4, since exiting a container is slightly different from rebooting a real machine (in particular, pid 1 has to exit, and great care must be given not to leave any zombie hanging around).
-
-c: inform the shutdown daemon that no catch-all logger is running. This also changes the shutdown procedure slightly, since some operations are specific to the existence of a catch-all logger.
Note¶
The 66-shutdownd binary is not meant to be called directly. It is automatically generated by a 66 scandir program invocation.