source: clfs-sysroot/BOOK/final-system/common/sysvinit.xml@ a7229a9

Last change on this file since a7229a9 was 1b2e691, checked in by Joe Ciccone <jciccone@…>, 15 years ago

Text Updates.

  • Property mode set to 100644
File size: 11.8 KB
RevLine 
[02095ae]1<?xml version="1.0" encoding="ISO-8859-1"?>
[c439b8a]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[02095ae]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7<sect1 id="ch-system-sysvinit" role="wrap">
8 <?dbhtml filename="sysvinit.html"?>
9
10 <title>Sysvinit-&sysvinit-version;</title>
11
12 <indexterm zone="ch-system-sysvinit">
13 <primary sortas="a-Sysvinit">Sysvinit</primary>
14 </indexterm>
15
16 <sect2 role="package">
17 <title/>
18
19 <para>The Sysvinit package contains programs for controlling the startup,
20 running, and shutdown of the system.</para>
21
22 </sect2>
23
[12e6567]24 &env-target;
25
[02095ae]26 <sect2 role="installation">
27 <title>Installation of Sysvinit</title>
28
[2411b2a]29 <para os="p1">The following patch contains a number of updates to the
30 &sysvinit-version;:</para>
31
32<screen os="p2"><userinput>patch -Np1 -i ../&sysvinit-fixes-patch;</userinput></screen>
[02095ae]33
[977c5d0]34 <para os="s1">The following sed makes changes in the Makefile required for cross-compiling:</para>
[02095ae]35
36<screen os="s2"><userinput>cp -v src/Makefile src/Makefile.orig
[d9bec84]37sed -e 's@/dev/initctl@$(ROOT)&amp;@g' \
[02095ae]38 -e 's@\(mknod \)-m \([0-9]* \)\(.* \)p@\1\3p; chmod \2\3@g' \
[d9bec84]39 -e '/^ifeq/s/$(ROOT)//' \
40 -e 's@/usr/lib@$(ROOT)&amp;@' \
[02095ae]41 src/Makefile.orig &gt; src/Makefile</userinput></screen>
42
43 <para os="c">Compile the package:</para>
44
45<screen os="d"><userinput>make -C src clobber
[586feb7]46make -C src ROOT=${CLFS} CC="${CC}"</userinput></screen>
[02095ae]47
48 <para os="e">Install the package:</para>
49
[586feb7]50<screen os="f"><userinput>make -C src ROOT=${CLFS} INSTALL="install" install</userinput></screen>
[02095ae]51
52 </sect2>
53
54 <sect2 id="conf-sysvinit" role="configuration">
55 <title>Configuring Sysvinit</title>
56
57 <indexterm zone="conf-sysvinit">
58 <primary sortas="a-Sysvinit">Sysvinit</primary>
59 <secondary>configuring</secondary></indexterm>
60
61 <indexterm zone="conf-sysvinit">
62 <primary sortas="e-/etc/inittab">/etc/inittab</primary>
63 </indexterm>
64
65 <para>Create a new file <filename>/etc/inittab</filename> by running the
66 following:</para>
67
[586feb7]68<screen><userinput>cat &gt; ${CLFS}/etc/inittab &lt;&lt; "EOF"
[02095ae]69<literal># Begin /etc/inittab
70
71id:3:initdefault:
72
73si::sysinit:/etc/rc.d/init.d/rc sysinit
74
75l0:0:wait:/etc/rc.d/init.d/rc 0
76l1:S1:wait:/etc/rc.d/init.d/rc 1
77l2:2:wait:/etc/rc.d/init.d/rc 2
78l3:3:wait:/etc/rc.d/init.d/rc 3
79l4:4:wait:/etc/rc.d/init.d/rc 4
80l5:5:wait:/etc/rc.d/init.d/rc 5
81l6:6:wait:/etc/rc.d/init.d/rc 6
82
83ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
84
85su:S016:once:/sbin/sulogin
[ac76cbb]86</literal>
87EOF</userinput></screen>
88
89 <para>The following command adds the standard virtual terminals to
90 <filename>/etc/inittab</filename>. If your system only has a serial
91 console skip the following command:</para>
[02095ae]92
[ac76cbb]93<screen><userinput>cat &gt;&gt; ${CLFS}/etc/inittab &lt;&lt; "EOF"
94<literal>1:2345:respawn:/sbin/agetty -I '\033(K' tty1 9600
[02095ae]952:2345:respawn:/sbin/agetty -I '\033(K' tty2 9600
963:2345:respawn:/sbin/agetty -I '\033(K' tty3 9600
974:2345:respawn:/sbin/agetty -I '\033(K' tty4 9600
985:2345:respawn:/sbin/agetty -I '\033(K' tty5 9600
996:2345:respawn:/sbin/agetty -I '\033(K' tty6 9600
[ac76cbb]100</literal>
101EOF</userinput></screen>
102
103 <para>If your system has a serial console run the following command to add
[1b2e691]104 the entry to <filename>/etc/inittab</filename>:</para>
[ac76cbb]105
106<screen><userinput>cat &gt;&gt; ${CLFS}/etc/inittab &lt;&lt; "EOF"
107<literal>c0:12345:respawn:/sbin/agetty 115200 ttyS0 vt100
108</literal>
109EOF</userinput></screen>
110
[1b2e691]111 <para>Finally, Add the end line to <filename>/etc/inittab</filename>:</para>
[02095ae]112
[ac76cbb]113<screen><userinput>cat &gt;&gt; ${CLFS}/etc/inittab &lt;&lt; "EOF"
114<literal># End /etc/inittab</literal>
[02095ae]115EOF</userinput></screen>
116
117 <para>The <parameter>-I '\033(K'</parameter> option tells
118 <command>agetty</command> to send this escape sequence to the terminal
119 before doing anything else. This escape sequence switches the console
120 character set to a user-defined one, which can be modified by running
121 the <command>setfont</command> program. The <command>console</command>
[1a09536]122 initscript from the CLFS-Bootscripts package calls the
[02095ae]123 <command>setfont</command> program during system startup. Sending this
124 escape sequence is necessary for people who use non-ISO 8859-1 screen
125 fonts, but it does not affect native English speakers.</para>
126
127 </sect2>
128
129 <sect2 id="contents-sysvinit" role="content">
130 <title>Contents of Sysvinit</title>
131
132 <segmentedlist>
133 <segtitle>Installed programs</segtitle>
134
135 <seglistitem>
[82b662d]136 <seg>bootlogd, halt, init, killall5, last, lastb (link to last), mesg,
137 mountpoint, pidof (link to killall5), poweroff (link to halt),
138 reboot (link to halt), runlevel, shutdown, sulogin,
139 telinit (link to init), utmpdump, and wall</seg>
[02095ae]140 </seglistitem>
141 </segmentedlist>
142
143 <variablelist>
144 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
145 <?dbfo list-presentation="list"?>
146 <?dbhtml list-presentation="table"?>
147
[82b662d]148 <varlistentry id="bootlogd">
149 <term><command>bootlogd</command></term>
150 <listitem>
151 <para>Logs boot messages to a log file</para>
152 <indexterm zone="ch-system-sysvinit bootlogd">
153 <primary sortas="b-bootlogd">bootlogd</primary>
154 </indexterm>
155 </listitem>
156 </varlistentry>
157
[02095ae]158 <varlistentry id="halt">
159 <term><command>halt</command></term>
160 <listitem>
161 <para>Normally invokes <command>shutdown</command> with the
162 <parameter>-h</parameter> option, except when already in run-level 0,
163 then it tells the kernel to halt the system; it notes in the
164 file <filename>/var/log/wtmp</filename> that the system is being
165 brought down</para>
166 <indexterm zone="ch-system-sysvinit halt">
167 <primary sortas="b-halt">halt</primary>
168 </indexterm>
169 </listitem>
170 </varlistentry>
171
172 <varlistentry id="init">
173 <term><command>init</command></term>
174 <listitem>
175 <para>The first process to be started when the kernel has initialized
176 the hardware which takes over the boot process and starts all the
177 proceses it is instructed to</para>
178 <indexterm zone="ch-system-sysvinit init">
179 <primary sortas="b-init">init</primary>
180 </indexterm>
181 </listitem>
182 </varlistentry>
183
184 <varlistentry id="killall5">
185 <term><command>killall5</command></term>
186 <listitem>
187 <para>Sends a signal to all processes, except the processes in its own
188 session so it will not kill the shell running the script that called
189 it</para>
190 <indexterm zone="ch-system-sysvinit killall5">
191 <primary sortas="b-killall5">killall5</primary>
192 </indexterm>
193 </listitem>
194 </varlistentry>
195
196 <varlistentry id="last">
197 <term><command>last</command></term>
198 <listitem>
199 <para>Shows which users last logged in (and out), searching back
200 through the <filename>/var/log/wtmp</filename> file; it also shows
201 system boots, shutdowns, and run-level changes</para>
202 <indexterm zone="ch-system-sysvinit last">
203 <primary sortas="b-last">last</primary>
204 </indexterm>
205 </listitem>
206 </varlistentry>
207
208 <varlistentry id="lastb">
209 <term><command>lastb</command></term>
210 <listitem>
211 <para>Shows the failed login attempts, as logged in
212 <filename>/var/log/btmp</filename></para>
213 <indexterm zone="ch-system-sysvinit lastb">
214 <primary sortas="b-lastb">lastb</primary>
215 </indexterm>
216 </listitem>
217 </varlistentry>
218
219 <varlistentry id="mesg">
220 <term><command>mesg</command></term>
221 <listitem>
222 <para>Controls whether other users can send messages to the current
223 user's terminal</para>
224 <indexterm zone="ch-system-sysvinit mesg">
225 <primary sortas="b-mesg">mesg</primary>
226 </indexterm>
227 </listitem>
228 </varlistentry>
229
[59fb197]230 <varlistentry id="mountpoint">
231 <term><command>mountpoint</command></term>
232 <listitem>
233 <para>Tells you whether or not a directory is a mount point.</para>
234 <indexterm zone="ch-system-sysvinit mountpoint">
235 <primary sortas="b-mountpoint">mountpoint</primary>
236 </indexterm>
237 </listitem>
238 </varlistentry>
239
[02095ae]240 <varlistentry id="pidof">
241 <term><command>pidof</command></term>
242 <listitem>
243 <para>Reports the PIDs of the given programs</para>
244 <indexterm zone="ch-system-sysvinit pidof">
245 <primary sortas="b-pidof">pidof</primary>
246 </indexterm>
247 </listitem>
248 </varlistentry>
249
250 <varlistentry id="poweroff">
251 <term><command>poweroff</command></term>
252 <listitem>
253 <para>Tells the kernel to halt the system and switch off the computer
254 (see <command>halt</command>)</para>
255 <indexterm zone="ch-system-sysvinit poweroff">
256 <primary sortas="b-poweroff">poweroff</primary>
257 </indexterm>
258 </listitem>
259 </varlistentry>
260
261 <varlistentry id="reboot">
262 <term><command>reboot</command></term>
263 <listitem>
264 <para>Tells the kernel to reboot the system (see
265 <command>halt</command>)</para>
266 <indexterm zone="ch-system-sysvinit reboot">
267 <primary sortas="b-reboot">reboot</primary>
268 </indexterm>
269 </listitem>
270 </varlistentry>
271
272 <varlistentry id="runlevel">
273 <term><command>runlevel</command></term>
274 <listitem>
275 <para>Reports the previous and the current run-level, as noted in
276 the last run-level record in <filename>/var/run/utmp</filename></para>
277 <indexterm zone="ch-system-sysvinit runlevel">
278 <primary sortas="b-runlevel">runlevel</primary>
279 </indexterm>
280 </listitem>
281 </varlistentry>
282
283 <varlistentry id="shutdown">
284 <term><command>shutdown</command></term>
285 <listitem>
286 <para>Brings the system down in a secure way, signaling all processes
287 and notifying all logged-in users</para>
288 <indexterm zone="ch-system-sysvinit shutdown">
289 <primary sortas="b-shutdown">shutdown</primary>
290 </indexterm>
291 </listitem>
292 </varlistentry>
293
294 <varlistentry id="sulogin">
295 <term><command>sulogin</command></term>
296 <listitem>
297 <para>Allows <emphasis>root</emphasis> to log in; it is normally
298 invoked by <command>init</command> when the system goes into single
299 user mode</para>
300 <indexterm zone="ch-system-sysvinit sulogin">
301 <primary sortas="b-sulogin">sulogin</primary>
302 </indexterm>
303 </listitem>
304 </varlistentry>
305
306 <varlistentry id="telinit">
307 <term><command>telinit</command></term>
308 <listitem>
309 <para>Tells <command>init</command> which run-level to change to</para>
310 <indexterm zone="ch-system-sysvinit telinit">
311 <primary sortas="b-telinit">telinit</primary>
312 </indexterm>
313 </listitem>
314 </varlistentry>
315
316 <varlistentry id="utmpdump">
317 <term><command>utmpdump</command></term>
318 <listitem>
319 <para>Displays the content of the given login file in a more
320 user-friendly format</para>
321 <indexterm zone="ch-system-sysvinit utmpdump">
322 <primary sortas="b-utmpdump">utmpdump</primary>
323 </indexterm>
324 </listitem>
325 </varlistentry>
326
327 <varlistentry id="wall">
328 <term><command>wall</command></term>
329 <listitem>
330 <para>Writes a message to all logged-in users</para>
331 <indexterm zone="ch-system-sysvinit wall">
332 <primary sortas="b-wall">wall</primary>
333 </indexterm>
334 </listitem>
335 </varlistentry>
336
337 </variablelist>
338
339 </sect2>
340
341</sect1>
Note: See TracBrowser for help on using the repository browser.