source: BOOK/final-system/common/sysvinit.xml@ 1f9faab

clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 1f9faab was 3b0c31e, checked in by Joe Ciccone <jciccone@…>, 14 years ago

Updated Sysvinit to 2.88dsf.

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