S6_SYSTEM(8)

NAME
s6 system - groups actions related to booting or shutting down the system

SYNOPSIS
s6 system subcommand

DESCRIPTION
No subcommand takes any options.

  Subcommands

help
    ‘s6 system help’ prints a short help message summarizing the options and usage of the ‘s6 system’ command. It is not as detailed as this page.

boot
    Interface

    s6 system boot

    •   ‘s6 system boot’ initializes the live directory for s6-rc then starts all the services defined in the default bundle. In other words, it brings the system from a state where nothing is running to a state where everything the user wants is running.

    •   This is the command that should be called as soon as the init program hands off duties.

        •   On a system making use of s6-linux-init[1], ‘s6 system boot’ should be run by the /etc/rc.init script. No other command needs to appear in that script.

        •   On a system using /etc/inittab, you need to add two lines at the beginning of /etc/inittab:

            •   The first line should be a command that runs and respawns s6-svscan(8), ideally with a catch-all logger. This could be something like ‘::respawn:/usr/lib/s6/s6-svscanboot’, with /usr/lib/s6/s6-svscanboot being similar to the script used in Alpine Linux[2] to start an instance of s6-svscan supervising its own catch-all logger.

            •   The second line should be ‘::wait:/usr/bin/s6 system boot’.

            •   For complete safety, there should be a synchronization mechanism so that the second line never starts before s6-svscan is ready. A quick and (very) dirty way to synchronize is polling on s6-svscan before running the command: ‘::wait:until s6-svscanctl /run/service 2>/dev/null; do :; done && exec /usr/bin/s6 system boot’

        •   It is also possible to run a complete s6 ecosystem under systemd, but it is redundant, so it's unlikely that anyone would want to do it. For the sake of completeness, the way would be to define two unit files: the first one to launch s6-svscan, as documented in s6-svscan-not-as-process-1(7), and the second one, specified to run after the first one, to run the ‘s6 system boot’ command as a one-shot.

    The rest of the subcommands are shutdown subcommands, and they only work if the machine makes use of s6-linux-init[1] and s6-frontend has been configured to support it. On a machine that does not boot via s6-linux-init, a shutdown should be executed via the shutdown commands provided by your init system. In order for the shutdown to be clean, the command ‘s6 live stop-everything -E’ should be run before the init system performs a hard shutdown. For instance, if the system uses /etc/inittab, then the following line should appear in /etc/inittab: ‘::shutdown:/usr/bin/s6 live stop-everything -E’

reboot
    Interface

    s6 system reboot

    •   ‘s6 system reboot’ reboots the machine.

    •   This only works if the machine makes use of s6-linux-init[1] and s6-frontend has been configured to support it.

poweroff
    Interface

    s6 system poweroff

    •   ‘s6 system poweroff’ halts the system and turns the power off.

    •   This only works if the machine makes use of s6-linux-init[1] and s6-frontend has been configured to support it.

halt
    Interface

    s6 system halt

    •   ‘s6 system halt’ halts the system without turning the power off.

    •   This only works if the machine makes use of s6-linux-init[1] and s6-frontend has been configured to support it.

SEE ALSO
s6-frontend-overview(7), s6-svscan-not-as-process-1(7), s6-svscan(8)

[1] https://skarnet.org/software/s6-linux-init/

[2] https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/main/s6/s6-svscanboot?ref_type=heads

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

AUTHORS
Laurent Bercot Lennart Jablonka <humm@ljabl.com> (man page port)