-
Eric Vidal authoredEric Vidal authored
title: The 66 Suite: 66-shutdownd author: Eric Vidal eric@obarun.org
66-shutdownd
The daemon that manages the shutdown procedure for a 66-boot installation. It is not meant to be called directly. This program is a modified copy of s6-linux-init-shudownd.
Interface
66-shutdownd [ -h ] [ -l live ] [ -s skel ] [ -g gracetime ]
-
66-shutdownd opens the
%%livedir%%/scandir/0/shutdownd/fifo
pipe 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%%skel%%
directory— and reads the value ofRCSHUTDOWN
to be able to spawn therc.shutdown
script. -
When said script exits 66-shutdownd kills all processes first with a
SIGTERM
then, after the grace time specified by the shutdown command, with aSIGKILL
. -
It then runs an automatically generated script called
stage4
which unmounts all file systems and halts, powers off or reboots the machine.
Exit codes
- 0 success
- 100 wrong usage
- 111 system call failed
Options
-
-h : prints this help.
-
-l live : changes the supervision directory of service to live. By default this will be
%%livedir%%
. The default can also be changed at compile time by passing the--livedir=live
option 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%%skel%%
. -
-g gracetime : specify a grace time between the
SIGTERM
and theSIGKILL
in milliseconds if the shutdown command does not provide one. Defaults to3000
.
Note
The 66-shutdownd binary is not meant to be called directly. It is automatically generated by a 66-scandir program invocation.