Changes in BOOK/boot/common/sysvinit.xml [2c67422:37ee606e]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOOK/boot/common/sysvinit.xml
r2c67422 r37ee606e 13 13 <indexterm zone="ch-boot-sysvinit"> 14 14 <primary sortas="a-Sysvinit">Sysvinit</primary> 15 <secondary>boot</secondary>16 15 </indexterm> 17 16 18 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 19 href="../../final-system/common/sysvinit.xml" 20 xpointer="xpointer(//*[@role='package'])"/> 17 <sect2 role="package"> 18 <title/> 19 20 <para>The Sysvinit package contains programs for controlling the startup, 21 running, and shutdown of the system.</para> 22 23 </sect2> 21 24 22 25 <sect2 role="installation"> 23 26 <title>Installation of Sysvinit</title> 24 27 25 <para os="aa">The following modifications help locate files specific to this 26 particular build:</para> 27 28 <screen os="ab"><userinput>cp -v src/Makefile{,.orig} 29 sed -e 's,/usr/lib,/tools/lib,g' \ 30 src/Makefile.orig > src/Makefile</userinput></screen> 31 32 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 33 href="../../final-system/common/sysvinit.xml" 34 xpointer="xpointer(//*[@os='c'])"/> 28 <para os="p1">Apply a patch to prevent installation of unneeded programs, 29 and allow Sysvinit to be installed in 30 <filename class="directory">/tools</filename>:</para> 31 32 <screen os="p2"><userinput>patch -Np1 -i ../sysvinit-&sysvinit-version;-tools_updates-1.patch</userinput></screen> 33 34 <para os ="c">Compile the package:</para> 35 35 36 36 <screen os="ac"><userinput>make -C src clobber 37 37 make -C src CC="${CC}"</userinput></screen> 38 38 39 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 40 href="../../final-system/common/sysvinit.xml" 41 xpointer="xpointer(//*[@os='e'])"/> 42 43 <screen os="ad"><userinput>make -C src ROOT=${CLFS} install</userinput></screen> 39 <para os="e">Install the package:</para> 40 41 <screen os="ad"><userinput>make -C src ROOT=/tools install</userinput></screen> 44 42 45 43 </sect2> … … 50 48 <indexterm zone="conf-tools-sysvinit"> 51 49 <primary sortas="a-Sysvinit">Sysvinit</primary> 52 <secondary> boot,configuring</secondary>50 <secondary>configuring</secondary> 53 51 </indexterm> 54 52 … … 57 55 </indexterm> 58 56 59 <para>Create a new file <filename> ${CLFS}/etc/inittab</filename> by running the57 <para>Create a new file <filename>/tools/etc/inittab</filename> by running the 60 58 following:</para> 61 59 62 <screen><userinput>cat > ${CLFS}/etc/inittab << "EOF"63 <literal># Begin / etc/inittab60 <screen><userinput>cat > /tools/etc/inittab << "EOF" 61 <literal># Begin /tools/etc/inittab 64 62 65 63 id:3:initdefault: 66 64 67 si::sysinit:/ etc/rc.d/init.d/rc sysinit68 69 l0:0:wait:/ etc/rc.d/init.d/rc 070 l1:S1:wait:/ etc/rc.d/init.d/rc 171 l2:2:wait:/ etc/rc.d/init.d/rc 272 l3:3:wait:/ etc/rc.d/init.d/rc 373 l4:4:wait:/ etc/rc.d/init.d/rc 474 l5:5:wait:/ etc/rc.d/init.d/rc 575 l6:6:wait:/ etc/rc.d/init.d/rc 676 77 ca:12345:ctrlaltdel:/ sbin/shutdown -t1 -a -r now78 79 su:S016:once:/ sbin/sulogin65 si::sysinit:/tools/etc/rc.d/init.d/rc sysinit 66 67 l0:0:wait:/tools/etc/rc.d/init.d/rc 0 68 l1:S1:wait:/tools/etc/rc.d/init.d/rc 1 69 l2:2:wait:/tools/etc/rc.d/init.d/rc 2 70 l3:3:wait:/tools/etc/rc.d/init.d/rc 3 71 l4:4:wait:/tools/etc/rc.d/init.d/rc 4 72 l5:5:wait:/tools/etc/rc.d/init.d/rc 5 73 l6:6:wait:/tools/etc/rc.d/init.d/rc 6 74 75 ca:12345:ctrlaltdel:/tools/sbin/shutdown -t1 -a -r now 76 77 su:S016:once:/tools/sbin/sulogin 80 78 </literal> 81 79 EOF</userinput></screen> 82 80 83 81 <para>The following command adds the standard virtual terminals to 84 <filename> ${CLFS}/etc/inittab</filename>. If your system only has a serial82 <filename>/tools/etc/inittab</filename>. If your system only has a serial 85 83 console skip the following command:</para> 86 84 87 <screen><userinput>cat >> ${CLFS}/etc/inittab << "EOF"88 <literal>1:2345:respawn:/ sbin/agetty --noclear -I '\033(K' tty1 960089 2:2345:respawn:/ sbin/agetty --noclear -I '\033(K' tty2 960090 3:2345:respawn:/ sbin/agetty --noclear -I '\033(K' tty3 960091 4:2345:respawn:/ sbin/agetty --noclear -I '\033(K' tty4 960092 5:2345:respawn:/ sbin/agetty --noclear -I '\033(K' tty5 960093 6:2345:respawn:/ sbin/agetty --noclear -I '\033(K' tty6 960085 <screen><userinput>cat >> /tools/etc/inittab << "EOF" 86 <literal>1:2345:respawn:/tools/sbin/agetty --noclear -I '\033(K' tty1 9600 87 2:2345:respawn:/tools/sbin/agetty --noclear -I '\033(K' tty2 9600 88 3:2345:respawn:/tools/sbin/agetty --noclear -I '\033(K' tty3 9600 89 4:2345:respawn:/tools/sbin/agetty --noclear -I '\033(K' tty4 9600 90 5:2345:respawn:/tools/sbin/agetty --noclear -I '\033(K' tty5 9600 91 6:2345:respawn:/tools/sbin/agetty --noclear -I '\033(K' tty6 9600 94 92 </literal> 95 93 EOF</userinput></screen> 96 94 97 95 <para>If your system has a serial console, run the following command to add 98 the entry to <filename> ${CLFS}/etc/inittab</filename>.</para>99 100 <screen><userinput>cat >> ${CLFS}/etc/inittab << "EOF"101 <literal>c0:12345:respawn:/ sbin/agetty --noclear 115200 ttyS0 vt10096 the entry to <filename>/tools/etc/inittab</filename>.</para> 97 98 <screen><userinput>cat >> /tools/etc/inittab << "EOF" 99 <literal>c0:12345:respawn:/tools/sbin/agetty --noclear 115200 ttyS0 vt100 102 100 </literal> 103 101 EOF</userinput></screen> 104 102 105 <para>Finally, add the end line to <filename>${CLFS}/etc/inittab</filename>.</para> 106 107 <screen><userinput>cat >> ${CLFS}/etc/inittab << "EOF" 108 <literal># End /etc/inittab</literal> 109 EOF</userinput></screen> 110 111 </sect2> 112 113 <sect2 role="content"> 114 <title/> 115 116 <para>Details on this package are located in <xref 117 linkend="contents-sysvinit" role="."/></para> 103 <para>Finally, add the end line to <filename>/tools/etc/inittab</filename>.</para> 104 105 <screen><userinput>cat >> /tools/etc/inittab << "EOF" 106 <literal># End /tools/etc/inittab</literal> 107 EOF</userinput></screen> 108 109 <para>The <parameter>-I '\033(K'</parameter> option tells 110 <command>agetty</command> to send this escape sequence to the terminal 111 before doing anything else. This escape sequence switches the console 112 character set to a user-defined one, which can be modified by running 113 the <command>setfont</command> program. Sending this 114 escape sequence is necessary for people who use non-ISO 8859-1 screen 115 fonts, but it does not affect native English speakers.</para> 116 117 </sect2> 118 119 <sect2 id="contents-sysvinit" role="content"> 120 <title>Contents of Sysvinit</title> 121 122 <segmentedlist> 123 <segtitle>Installed programs</segtitle> 124 125 <seglistitem> 126 <seg>bootlogd, fstab-decode, halt, init, killall5, 127 poweroff (link to halt), reboot (link to halt), runlevel, 128 shutdown, and telinit (link to init)</seg> 129 </seglistitem> 130 </segmentedlist> 131 132 <variablelist> 133 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 134 <?dbfo list-presentation="list"?> 135 <?dbhtml list-presentation="table"?> 136 137 <varlistentry id="bootlogd"> 138 <term><command>bootlogd</command></term> 139 <listitem> 140 <para>Logs boot messages to a log file</para> 141 <indexterm zone="ch-boot-sysvinit bootlogd"> 142 <primary sortas="b-bootlogd">bootlogd</primary> 143 </indexterm> 144 </listitem> 145 </varlistentry> 146 147 <varlistentry id="fstab-decode"> 148 <term><command>fstab-decode</command></term> 149 <listitem> 150 <para>Runs a command with fstab-encoded arguments</para> 151 <indexterm zone="ch-boot-sysvinit fstab-decode"> 152 <primary sortas="b-fstab-decode">fstab-decode</primary> 153 </indexterm> 154 </listitem> 155 </varlistentry> 156 157 <varlistentry id="halt"> 158 <term><command>halt</command></term> 159 <listitem> 160 <para>Normally invokes <command>shutdown</command> with the 161 <parameter>-h</parameter> option, except when already in run-level 0, 162 then it tells the kernel to halt the system; it notes in the 163 file <filename>/var/log/wtmp</filename> that the system is being 164 brought down</para> 165 <indexterm zone="ch-boot-sysvinit halt"> 166 <primary sortas="b-halt">halt</primary> 167 </indexterm> 168 </listitem> 169 </varlistentry> 170 171 <varlistentry id="init"> 172 <term><command>init</command></term> 173 <listitem> 174 <para>The first process to be started when the kernel has initialized 175 the hardware which takes over the boot process and starts all the 176 proceses it is instructed to</para> 177 <indexterm zone="ch-boot-sysvinit init"> 178 <primary sortas="b-init">init</primary> 179 </indexterm> 180 </listitem> 181 </varlistentry> 182 183 <varlistentry id="killall5"> 184 <term><command>killall5</command></term> 185 <listitem> 186 <para>Sends a signal to all processes, except the processes in its own 187 session so it will not kill the shell running the script that called 188 it</para> 189 <indexterm zone="ch-boot-sysvinit killall5"> 190 <primary sortas="b-killall5">killall5</primary> 191 </indexterm> 192 </listitem> 193 </varlistentry> 194 195 <varlistentry id="poweroff"> 196 <term><command>poweroff</command></term> 197 <listitem> 198 <para>Tells the kernel to halt the system and switch off the computer 199 (see <command>halt</command>)</para> 200 <indexterm zone="ch-boot-sysvinit poweroff"> 201 <primary sortas="b-poweroff">poweroff</primary> 202 </indexterm> 203 </listitem> 204 </varlistentry> 205 206 <varlistentry id="reboot"> 207 <term><command>reboot</command></term> 208 <listitem> 209 <para>Tells the kernel to reboot the system (see 210 <command>halt</command>)</para> 211 <indexterm zone="ch-boot-sysvinit reboot"> 212 <primary sortas="b-reboot">reboot</primary> 213 </indexterm> 214 </listitem> 215 </varlistentry> 216 217 <varlistentry id="runlevel"> 218 <term><command>runlevel</command></term> 219 <listitem> 220 <para>Reports the previous and the current run-level, as noted in 221 the last run-level record in <filename>/var/run/utmp</filename></para> 222 <indexterm zone="ch-boot-sysvinit runlevel"> 223 <primary sortas="b-runlevel">runlevel</primary> 224 </indexterm> 225 </listitem> 226 </varlistentry> 227 228 <varlistentry id="shutdown"> 229 <term><command>shutdown</command></term> 230 <listitem> 231 <para>Brings the system down in a secure way, signaling all processes 232 and notifying all logged-in users</para> 233 <indexterm zone="ch-boot-sysvinit shutdown"> 234 <primary sortas="b-shutdown">shutdown</primary> 235 </indexterm> 236 </listitem> 237 </varlistentry> 238 239 <varlistentry id="telinit"> 240 <term><command>telinit</command></term> 241 <listitem> 242 <para>Tells <command>init</command> which run-level to change to</para> 243 <indexterm zone="ch-boot-sysvinit telinit"> 244 <primary sortas="b-telinit">telinit</primary> 245 </indexterm> 246 </listitem> 247 </varlistentry> 248 249 </variablelist> 118 250 119 251 </sect2>
Note:
See TracChangeset
for help on using the changeset viewer.