From 2e9ba9d96c7b1f71efc920755a8940da8b8bf476 Mon Sep 17 00:00:00 2001 From: "Thomas Trepl (Moody)" Date: Wed, 10 Aug 2022 11:51:18 +0200 Subject: [PATCH] Updates --- chapter09/chapter09.xml | 1 + chapter09/usage6.xml | 82 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 74 insertions(+), 9 deletions(-) diff --git a/chapter09/chapter09.xml b/chapter09/chapter09.xml index d94612401..54e86d628 100644 --- a/chapter09/chapter09.xml +++ b/chapter09/chapter09.xml @@ -21,6 +21,7 @@ + diff --git a/chapter09/usage6.xml b/chapter09/usage6.xml index 2a9d074bf..081340d17 100644 --- a/chapter09/usage6.xml +++ b/chapter09/usage6.xml @@ -11,9 +11,70 @@ S6 Usage and Configuration - *** Add more info about S6 here. *** + Some information about S6 in general and in detail... + + + Terminology - Now setup some essential scripts for booting. + + S6 does not look that trivial on the first view. Some + clarification on the terminology of S6 might help to understand + what is talked about. + + + + + service directory + + A directory, where your service definitions are + stored. That is the direcory where all the directories + containing type, up, + down and dependencies + resides in. In the service directory can be much more + service definitions be stored than you might actually are + going to use. + + + + + scan directory + + Pretty much same structure as a service directory + but it contains only that services which are used on your + system. The scandir can contain symbolic links to services + in the service directory. + + + + + + + + The boot scripts + + Now setup some essential scripts for booting. + + + After init has been started, the s6 rc.init file is read. + The file can be found in /etc/s6-linux-init/skel. + This file can be used to start the S6 service manager as well + as optionally other service managers. To enable s6-rc, execute + following command to uncomment the respective line: + + +sed -e "s/^# s6-rc-init/s6-rc-init/" \ + -i /etc/s6-linux-init/skel/rc.init + + + + Whenever you change files in the skel directory, it is + required to reinstall them using the s6-linux-init-maker + script. + + + Execute the following commands to rebuild the files. + + - Make sure that the configuration directory exists: + Make sure that the configuration directory exists: mkdir -p /etc/s6-linux-init - Setup a temporary directory: + Setup a temporary directory name (the directory itself + must not exist): -tmpdir=$(mktemp -d) +tmpdir=$(mktemp -d -u) - Create essential programs and move them to a - directory representing the current setup: + Create essential programs and move them to a + directory representing the current setup: -s6-linux-init-maker -1 -G "/sbin/agetty 38400 tty1" $tmpdir +s6-linux-init-maker -1 -G "/sbin/agetty -J 38400 tty1" $tmpdir mv $tmpdir /etc/etc/s6-linux-init/current - Install the essential programs in the file system: + Install the essential programs in the file system: cp -av /etc/etc/s6-linux-init/current/bin/* /sbin/ + +