From 5199738f4e32773f4f752a94998593e18e3af36f Mon Sep 17 00:00:00 2001
From: Laurent Bercot
Date: Tue, 16 Apr 2019 11:53:30 +0000
Subject: Small fixes before reorganizing
---
doc/s6-linux-init-maker.html | 81 ++++++++++++++++++++------------------------
1 file changed, 36 insertions(+), 45 deletions(-)
(limited to 'doc')
diff --git a/doc/s6-linux-init-maker.html b/doc/s6-linux-init-maker.html
index 4c0b51d..6f3d204 100644
--- a/doc/s6-linux-init-maker.html
+++ b/doc/s6-linux-init-maker.html
@@ -49,20 +49,18 @@ machine - else the scripts will crash.
s6-linux-init-maker \
[ -c basedir ] \
- [ -l tmpfsdir ] \
[ -b execline_bindir ] \
[ -u log_uid -g log_gid | -U ] \
[ -G early_getty ] \
- [ -2 initscript ] \
- [ -r ] \
- [ -Z ] shutdownscript \
+ [ -1 ] \
+ [ -L ] \
[ -p initial_path ] \
[ -m initial_umask ] \
[ -t timestamp_style ] \
[ -d dev_style ] \
[ -s env_store ] \
[ -e initial_envvar ] ... \
- [ -n ] \
+ [ -E stage2_envvar ] ... \
[ -q ] finalsleeptime
dir
@@ -87,18 +85,28 @@ tool can do it, as well as the GNU or busybox cp -a or mv comm
- The basedir/init script
-is then suitable as a "stage 1" init program, i.e. the first program
-run by the kernel. The administrator should make a symbolic link
-from /sbin/init to basedir/init; the
-machine will then be ready to boot
+ The basedir/bin directory contains scripts, or
+links to programs, that are suitable as System V-compatible programs
+of the same name; the administrator should copy them to (or symlink
+them from) a place where those programs are usually found, typically
+/sbin.
+
+
+
+ In particular, the basedir/bin/init script
+suitable as a "stage 1" init program, i.e. the first program
+run by the kernel (possibly after an initramfs execution).
+Once this script is copied to, or symlinked from,
+/sbin/init, the machine will be ready to boot on the
+new s6-based system.
Boot sequence
- When the kernel boots, it runs the basedir/init script,
-also known as stage 1. and this is what happens:
+ When the kernel boots, it may run an initramfs first, but in any
+case it then runs the basedir/init script,
+also known as stage 1. This is what happens during stage 1:
@@ -246,11 +254,6 @@ created directory dir to basedir. basedir
must be absolute. Default is
/etc/s6-linux-init.
- - -l tmpfsdir : at boot time, a tmpfs will
-be mounted on tmpfsdir. The directory should already exist in
-the root filesystem, and be empty. tmpfsdir must be absolute. Default is
-/run.
-
- -b execline_bindir : init is run by the kernel
without a PATH, and since it is a script, it is necessary to tell it where
to find the
@@ -285,27 +288,13 @@ should be a getty, to allow logins even if stage2 fails.
"/sbin/getty 38400 tty1". By default, no early service
is defined.
- - -2 initscript : initscript is
-the location of the stage 2 script that will be run when the
-system has an operational supervision tree. It must be absolute. Default is
-/etc/rc.init.
-
- - -r : redirect. By default, stage2 is
-run with stdout and stderr pointing to /dev/console, so that
-users can see what init scripts print. However, it may conflict
-with an early getty, or be undesirable for other reasons. The
--r option redirects stage2's stdout and stderr
-to the catch-all logger, so the output will be made available
-in the tmpfsdir/uncaught-logs directory.
-
- - -Z shutdownscript :
-shutdownscript is the location of the script that will be
-run when s6-svscan receives a signal that tells it to stop the
-machine, before it executes into the final shutdown sequence. It must be
-absolute. Default is /etc/rc.shutdown.
-Note that this script is run with its stdout and stderr
-redirected to the tmpfsdir/uncaught-logs logging
-directory, so its output will not appear on the system's console.
+ - -1 : make it so that all the messages that are
+sent to the catch-all logger (i.e. all the error messages that are not
+caught by a dedicated logger, as well as the output from stage2)
+are also copied to /dev/console. This is generally useful to
+debug a system at a glance, but if a failing program keeps sending
+error messages, it may interfere with comfortable usage of an early
+getty.
- -p initial_path : the value to
set the PATH environment variable to, for all the starting processes.
@@ -360,16 +349,18 @@ will adjust the global environment directory in dir/env.
to make sure that VAR does not appear in the global
environment, or of the form VAR=VALUE, to add an
environment variable VAR with the value VALUE.
+The global environment is the environment that every supervised
+process (as well as the stage2 script) will run with,
+so it will be inherited by default by every process running on
+the system.
The TZ variable, for instance, is a good candidate to be set in
the global environment.
- - -n : tells s6-linux-init-maker that the init script
-is going to run in a container, as pid 1 in a non-root namespace.
-This modifies the .s6-svscan/finish, .s6-svscan/SIGHUP
-and .s6-svscan/SIGINT scripts slightly, in order to provide
-adequate functionality when the containerized system is asked to
-shutdown. Do not add this option if the init script is going to run
-in the root pid namespace.
+ - -E stage2_envvar : same behaviour
+as the -e option, except that every declared
+stage2_envvar will be put in the environment run by the
+stage2 script. They will not be put in the global
+environment.
- -q finalsleeptime : when the machine
shuts down, all processes that have not already been killed during
--
cgit v1.2.3