source: BOOK/final-system/common/sysvinit.xml@ 21056e9

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 21056e9 was de28452, checked in by Jim Gifford <clfs@…>, 16 years ago

Added patch to fix issues with Sysvinit

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