diff options
author | Thomas Trepl (Moody) <thomas@linuxfromscratch.org> | 2022-08-10 11:51:18 +0200 |
---|---|---|
committer | Thomas Trepl (Moody) <thomas@linuxfromscratch.org> | 2022-08-10 11:51:18 +0200 |
commit | 2e9ba9d96c7b1f71efc920755a8940da8b8bf476 (patch) | |
tree | 6d1c90b395523aa3d7eb47b44591828be2bb9421 | |
parent | f3b09304ffca86cbc28a1e3829c253d28fdb0ce8 (diff) |
Updates
-rw-r--r-- | chapter09/chapter09.xml | 1 | ||||
-rw-r--r-- | 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 @@ <!-- s6 --> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction6.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bootscripts6.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="network6.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="usage6.xml"/> 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 @@ <title>S6 Usage and Configuration</title> - <para>*** Add more info about S6 here. ***</para> + <para>Some information about S6 in general and in detail...</para> + + <sect2> + <title>Terminology</title> + + <para> + 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. + </para> + + <itemizedlist> + <listitem> + <para>service directory</para> + <para> + A directory, where your service definitions are + stored. That is the direcory where all the directories + containing <filename>type</filename>, <filename>up</filename>, + <filename>down</filename> and <filename>dependencies</filename> + resides in. In the service directory can be much more + service definitions be stored than you might actually are + going to use. + </para> + </listitem> + + <listitem> + <para>scan directory</para> + <para> + Pretty much same structure as a <emphasis>service directory</emphasis> + but it contains only that services which are used on your + system. The scandir can contain symbolic links to services + in the <emphasis>service directory</emphasis>. + </para> + </listitem> + </itemizedlist> + + </sect2> + + <sect2> + <title>The boot scripts</title> + + <para>Now setup some essential scripts for booting.</para> - <para>Now setup some essential scripts for booting.</para> + <para> + After init has been started, the s6 rc.init file is read. + The file can be found in <filename class="directory">/etc/s6-linux-init/skel</filename>. + 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: + </para> + +<screen><userinput>sed -e "s/^# s6-rc-init/s6-rc-init/" \ + -i /etc/s6-linux-init/skel/rc.init</userinput></screen> + + <note> + <para> + Whenever you change files in the skel directory, it is + required to reinstall them using the <filename>s6-linux-init-maker</filename> + script. + </para> + <para> + Execute the following commands to rebuild the files. + </para> + </note> <!-- Following setup is taken from @@ -28,23 +89,26 @@ ... but it boots ;-) --> - <para>Make sure that the configuration directory exists:</para> + <para>Make sure that the configuration directory exists:</para> <screen><userinput>mkdir -p /etc/s6-linux-init</userinput></screen> - <para>Setup a temporary directory:</para> + <para>Setup a temporary directory name (the directory itself + must not exist):</para> -<screen><userinput>tmpdir=$(mktemp -d)</userinput></screen> +<screen><userinput>tmpdir=$(mktemp -d -u)</userinput></screen> - <para>Create essential programs and move them to a - directory representing the current setup:</para> + <para>Create essential programs and move them to a + directory representing the current setup:</para> -<screen><userinput>s6-linux-init-maker -1 -G "/sbin/agetty 38400 tty1" $tmpdir +<screen><userinput>s6-linux-init-maker -1 -G "/sbin/agetty -J 38400 tty1" $tmpdir mv $tmpdir /etc/etc/s6-linux-init/current </userinput></screen> - <para>Install the essential programs in the file system:</para> + <para>Install the essential programs in the file system:</para> <screen><userinput>cp -av /etc/etc/s6-linux-init/current/bin/* /sbin/</userinput></screen> + </sect2> + </sect1> |