Changeset 2e9ba9d
- Timestamp:
- 08/10/2022 09:51:18 AM (10 months ago)
- Branches:
- s6-init
- Children:
- 804c3e5
- Parents:
- f3b0930
- Location:
- chapter09
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter09/chapter09.xml
rf3b0930 r2e9ba9d 22 22 <!-- s6 --> 23 23 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction6.xml"/> 24 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bootscripts6.xml"/> 24 25 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="network6.xml"/> 25 26 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="usage6.xml"/> -
chapter09/usage6.xml
rf3b0930 r2e9ba9d 12 12 <title>S6 Usage and Configuration</title> 13 13 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> 15 18 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> 17 78 18 79 <!-- … … 29 90 ... but it boots ;-) 30 91 --> 31 <para>Make sure that the configuration directory exists:</para>92 <para>Make sure that the configuration directory exists:</para> 32 93 33 94 <screen><userinput>mkdir -p /etc/s6-linux-init</userinput></screen> 34 95 35 <para>Setup a temporary directory:</para> 96 <para>Setup a temporary directory name (the directory itself 97 must not exist):</para> 36 98 37 <screen><userinput>tmpdir=$(mktemp -d )</userinput></screen>99 <screen><userinput>tmpdir=$(mktemp -d -u)</userinput></screen> 38 100 39 <para>Create essential programs and move them to a40 directory representing the current setup:</para>101 <para>Create essential programs and move them to a 102 directory representing the current setup:</para> 41 103 42 <screen><userinput>s6-linux-init-maker -1 -G "/sbin/agetty 38400 tty1" $tmpdir104 <screen><userinput>s6-linux-init-maker -1 -G "/sbin/agetty -J 38400 tty1" $tmpdir 43 105 mv $tmpdir /etc/etc/s6-linux-init/current 44 106 </userinput></screen> 45 107 46 <para>Install the essential programs in the file system:</para>108 <para>Install the essential programs in the file system:</para> 47 109 48 110 <screen><userinput>cp -av /etc/etc/s6-linux-init/current/bin/* /sbin/</userinput></screen> 49 111 112 </sect2> 113 50 114 </sect1>
Note:
See TracChangeset
for help on using the changeset viewer.