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 +++++++++++++++++-------------------- src/init/s6-linux-init-maker.c | 50 +++++++++++++---------- src/init/s6-linux-init.c | 16 ++++---- src/state/s6-linux-init-shutdown.c | 1 - src/state/s6-linux-init-shutdownd.c | 43 ++------------------ 5 files changed, 75 insertions(+), 116 deletions(-) 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: