S6-LINUX-INIT-SHUTDOWND(8)

NAME
s6-linux-init-shutdownd - manage the shutdown procedure for an s6-linux-init installation

SYNOPSIS
s6-linux-init-shutdownd [-d notif] [-c basedir] [-g gracetime] [-C] [-B]

DESCRIPTION
s6-linux-init-shutdownd is the daemon that manages the shutdown procedure for an s6-linux-init installation. It is not meant to be called directly by the user.

s6-linux-init-shutdownd opens a named pipe in its current directory and listens to it. This fifo has a fixed, internal, name: this is a rendezvous point where programs such as s6-linux-init-shutdown(8) send their commands when they are told to trigger the shutdown procedure.

When it receives a command to shut down, s6-linux-init-shutdownd first spawns the rc.shutdown script defined by the s6-linux-init-maker(8) invocation that created the ‘shutdownd’ service.

When this script exits, s6-linux-init-shutdownd kills all processes, first with a SIGTERM, then ( after the grace time specified by the shutdown command) with a SIGKILL.

It then runs an automatically-generated script ( called stage 4), which unmounts the file systems and halts, powers off or reboots the machine.

The s6-linux-init-shutdownd binary is not meant to be called directly by administrators. It is run by an s6 service that is automatically generated by s6-linux-init-maker(8).

OPTIONS

-d notif
    When ready ( actually listening to its named pipe), write a newline to file descriptor notif then close it. This allows s6-linux-init-shutdownd to use the s6-notifywhenup(7) mechanism to notify readiness. notif cannot be lesser than 3. If this option is not given, no readiness notification is sent.

-c basedir
    Look for the rc.shutdown script in the basedir/scripts directory. Default is /etc/s6-linux-init/current.

-g gracetime
    If the shutdown command does not specify a grace time between the SIGTERM and the SIGKILL, use gracetime milliseconds. Default is ‘3000’.

-C  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).

-B  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.

EXIT STATUS

0   Success.

100 Permanent error ( such as a misuse).

111 Temporary error ( such as a system call failure).

SEE ALSO
s6-linux-init-echo(1), s6-linux-init-overview(7), s6-linux-init-quickstart(7), s6-linux-init-why(7), s6-linux-init(8), s6-linux-init-hpr(8), s6-linux-init-logouthookd(8), s6-linux-init-maker(8), s6-linux-init-nuke(8), s6-linux-init-shutdown(8), s6-linux-init-telinit(8), s6-linux-init-umountall(8)

This man page is ported from the authoritative documentation at: https://skarnet.org/software/s6-linux-init/s6-linux-init-shutdownd.html

AUTHORS
Laurent Bercot Alexis <flexibeast@gmail.com> (man page port)