source: BOOK/final-system/common/sysvinit.xml@ 52f7ec7

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 52f7ec7 was 1da2a84, checked in by Joe Ciccone <jciccone@…>, 16 years ago

Checked and Updated Download Locations.
Updated Tree to 1.5.2.1.
Updated Util-Linux-NG to 2.14.1.
Updated TCL to 8.5.4.
Updated E2fsprogs to 1.41.1.
Updated M4 to 1.4.11.
Updated Kbd to 1.14.
Updated Bzip2 to 1.0.5.
Updated Autoconf to 2.63.
Updated Findutils to 4.4.0.
Updated Man-Pages to 3.09.
Updated Man to 1.6f.
Updated Shadow to 4.1.2.1.
Updated IPRoute2 to 2.6.26.
Updated Libtool to 2.2.6a.
Updated Module-Init-Tools to 3.4.1.
Updated Texinfo to 4.12.
Updated Vim to 7.2.
Updated MPFR to 2.3.2.
Updated Udev to 128.
Updated Linux to 2.6.26.5.
Applied fixes to Expect to make it compatible with TCL 8.5.
Add -Duseshrplib to the perl configure command. This causes perl to build a shared libperl.
Formatting fixes on multiple pages.
Use a Common inittab across all architectures.
Updated Bootscripts to 1.2-pre1.

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