Ignore:
Timestamp:
08/10/2022 09:51:18 AM (21 months ago)
Author:
Thomas Trepl (Moody) <thomas@…>
Branches:
s6-init
Children:
804c3e5
Parents:
f3b0930
Message:

Updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter09/usage6.xml

    rf3b0930 r2e9ba9d  
    1212  <title>S6 Usage and Configuration</title>
    1313
    14   <para>*** Add more info about S6 here. ***</para>
     14  <para>Some information about S6 in general and in detail...</para>
     15 
     16  <sect2>
     17    <title>Terminology</title>
    1518
    16   <para>Now setup some essential scripts for booting.</para>
     19    <para>
     20      S6 does not look that trivial on the first view. Some
     21      clarification on the terminology of S6 might help to understand
     22      what is talked about.
     23    </para>
     24
     25    <itemizedlist>
     26      <listitem>
     27        <para>service directory</para>
     28        <para>
     29          A directory, where your service definitions are
     30          stored. That is the direcory where all the directories
     31          containing <filename>type</filename>, <filename>up</filename>,
     32          <filename>down</filename> and <filename>dependencies</filename>
     33          resides in. In the service directory can be much more
     34          service definitions be stored than you might actually are
     35          going to use.
     36        </para>
     37      </listitem>
     38     
     39      <listitem>
     40        <para>scan directory</para>
     41        <para>
     42          Pretty much same structure as a <emphasis>service directory</emphasis>
     43          but it contains only that services which are used on your
     44          system. The scandir can contain symbolic links to services
     45          in the <emphasis>service directory</emphasis>.
     46        </para>
     47      </listitem>
     48    </itemizedlist>
     49   
     50  </sect2>
     51 
     52  <sect2>
     53    <title>The boot scripts</title>
     54   
     55    <para>Now setup some essential scripts for booting.</para>
     56
     57    <para>
     58      After init has been started, the s6 rc.init file is read.
     59      The file can be found in <filename class="directory">/etc/s6-linux-init/skel</filename>.
     60      This file can be used to start the S6 service manager as well
     61      as optionally other service managers. To enable s6-rc, execute
     62      following command to uncomment the respective line:
     63    </para>
     64
     65<screen><userinput>sed -e "s/^# s6-rc-init/s6-rc-init/" \
     66    -i /etc/s6-linux-init/skel/rc.init</userinput></screen>
     67
     68    <note>
     69      <para>
     70        Whenever you change files in the skel directory, it is
     71        required to reinstall them using the <filename>s6-linux-init-maker</filename>
     72        script.
     73      </para>
     74      <para>
     75        Execute the following commands to rebuild the files.
     76      </para>
     77    </note>
    1778
    1879<!--
     
    2990  ... but it boots ;-)
    3091--> 
    31   <para>Make sure that the configuration directory exists:</para>
     92    <para>Make sure that the configuration directory exists:</para>
    3293 
    3394<screen><userinput>mkdir -p /etc/s6-linux-init</userinput></screen> 
    3495
    35   <para>Setup a temporary directory:</para>
     96    <para>Setup a temporary directory name (the directory itself
     97    must not exist):</para>
    3698
    37 <screen><userinput>tmpdir=$(mktemp -d)</userinput></screen> 
     99<screen><userinput>tmpdir=$(mktemp -d -u)</userinput></screen> 
    38100
    39   <para>Create essential programs and move them to a
    40   directory representing the current setup:</para>
     101    <para>Create essential programs and move them to a
     102      directory representing the current setup:</para>
    41103
    42 <screen><userinput>s6-linux-init-maker -1 -G "/sbin/agetty 38400 tty1" $tmpdir
     104<screen><userinput>s6-linux-init-maker -1 -G "/sbin/agetty -J 38400 tty1" $tmpdir
    43105mv $tmpdir /etc/etc/s6-linux-init/current
    44106</userinput></screen> 
    45107
    46   <para>Install the essential programs in the file system:</para>
     108    <para>Install the essential programs in the file system:</para>
    47109
    48110<screen><userinput>cp -av /etc/etc/s6-linux-init/current/bin/* /sbin/</userinput></screen> 
    49111
     112  </sect2>
     113 
    50114</sect1>
Note: See TracChangeset for help on using the changeset viewer.