From c2740b983f6bb4baf0d5a1772fa3682cc66aa5f9 Mon Sep 17 00:00:00 2001
From: Laurent Bercot
Date: Sun, 18 Jan 2026 02:50:51 +0000
Subject: Add s6 live install --init ; finish and fix documentation
---
doc/s6_system.html | 68 ++++++++++++++++++++++++++++++------------------------
1 file changed, 38 insertions(+), 30 deletions(-)
(limited to 'doc/s6_system.html')
diff --git a/doc/s6_system.html b/doc/s6_system.html
index 10d52d7..a226a27 100644
--- a/doc/s6_system.html
+++ b/doc/s6_system.html
@@ -24,9 +24,7 @@
the system.
-
-
Interface
-
+ Interface
s6 system subcommand
@@ -36,22 +34,16 @@ the system.
No subcommand takes any options.
-
-
Subcommands
-
+ Subcommands
-
-
help
-
+ 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
-
+ boot
Interface
@@ -68,18 +60,40 @@ a state where everything the user wants is running.
program hands off duties.
- On a system making use of
-s6-linux-init/a>,
-s6 system boot should be the sole command defined in the
-/etc/rc.init script.
- - On a system using /etc/inittab, the first line
-of the inittab should be: ::wait:/usr/bin/s6 system boot
+s6-linux-init,
+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,
+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 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 here,
+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/a> and
+s6-linux-init 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
@@ -90,9 +104,7 @@ following line should appear in /etc/inittab:
::shutdown:/usr/bin/s6 live stop_everything -E
-
-
reboot
-
+ reboot
Interface
@@ -103,13 +115,11 @@ following line should appear in /etc/inittab:
-
-
poweroff
-
+ poweroff
Interface
@@ -121,13 +131,11 @@ s6-frontend has been configured to support it.
s6 system poweroff halts the system and turns the
power off.
This only works if the machine makes use of
-s6-linux-init/a> and
+s6-linux-init and
s6-frontend has been configured to support it.
-
-
halt
-
+ halt
Interface
@@ -139,7 +147,7 @@ s6-frontend has been configured to support it.
s6 system halt halts the system without turning
the power off.
This only works if the machine makes use of
-s6-linux-init/a> and
+s6-linux-init and
s6-frontend has been configured to support it.
--
cgit v1.3.1