source: chapter06/sysvinit.xml@ fe6ca49

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since fe6ca49 was fe6ca49, checked in by Matthew Burgess <matthew@…>, 15 years ago

Apply a few text updates from Chris Staub. Fixes #2442.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8965 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 10.9 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
8<sect1 id="ch-system-sysvinit" role="wrap">
9 <?dbhtml filename="sysvinit.html"?>
10
11 <sect1info condition="script">
12 <productname>sysvinit</productname>
13 <productnumber>&sysvinit-version;</productnumber>
14 <address>&sysvinit-url;</address>
15 </sect1info>
16
17 <title>Sysvinit-&sysvinit-version;</title>
18
19 <indexterm zone="ch-system-sysvinit">
20 <primary sortas="a-Sysvinit">Sysvinit</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>The Sysvinit package contains programs for controlling the startup,
27 running, and shutdown of the system.</para>
28
29 <segmentedlist>
30 <segtitle>&buildtime;</segtitle>
31 <segtitle>&diskspace;</segtitle>
32
33 <seglistitem>
34 <seg>&sysvinit-ch6-sbu;</seg>
35 <seg>&sysvinit-ch6-du;</seg>
36 </seglistitem>
37 </segmentedlist>
38
39 </sect2>
40
41 <sect2 role="installation">
42 <title>Installation of Sysvinit</title>
43
44 <para>When run-levels are changed (for example, when halting the
45 system), <command>init</command> sends termination signals to those
46 processes that <command>init</command> itself started and that should
47 not be running in the new run-level. While doing this,
48 <command>init</command> outputs messages like <quote>Sending processes
49 the TERM signal</quote> which seem to imply that it is sending these
50 signals to all currently running processes. To avoid this
51 misinterpretation, modify the source so that these messages read like
52 <quote>Sending processes configured via /etc/inittab the TERM signal</quote>
53 instead:</para>
54
55<screen><userinput remap="pre">sed -i 's@Sending processes@&amp; configured via /etc/inittab@g' \
56 src/init.c</userinput></screen>
57
58 <para>A maintained version of the <command>wall</command> program was
59 installed earlier by Util-linux-ng. Suppress the installation of Sysvinit's
60 version of this program and its man page:</para>
61
62<screen><userinput remap="make">sed -i -e 's/utmpdump wall/utmpdump/' \
63 -e 's/mountpoint.1 wall.1/mountpoint.1/' src/Makefile</userinput></screen>
64
65 <para>Compile the package:</para>
66
67<screen><userinput remap="make">make -C src</userinput></screen>
68
69 <para>This package does not come with a test suite.</para>
70
71 <para>Install the package:</para>
72
73<screen><userinput remap="install">make -C src install</userinput></screen>
74
75 </sect2>
76
77 <sect2 id="conf-sysvinit" role="configuration">
78 <title>Configuring Sysvinit</title>
79
80 <indexterm zone="conf-sysvinit">
81 <primary sortas="a-Sysvinit">Sysvinit</primary>
82 <secondary>configuring</secondary>
83 </indexterm>
84
85 <indexterm zone="conf-sysvinit">
86 <primary sortas="e-/etc/inittab">/etc/inittab</primary>
87 </indexterm>
88
89 <para>Create a new file <filename>/etc/inittab</filename> by running the
90 following:</para>
91
92<screen><userinput>cat &gt; /etc/inittab &lt;&lt; "EOF"
93<literal># Begin /etc/inittab
94
95id:3:initdefault:
96
97si::sysinit:/etc/rc.d/init.d/rc sysinit
98
99l0:0:wait:/etc/rc.d/init.d/rc 0
100l1:S1:wait:/etc/rc.d/init.d/rc 1
101l2:2:wait:/etc/rc.d/init.d/rc 2
102l3:3:wait:/etc/rc.d/init.d/rc 3
103l4:4:wait:/etc/rc.d/init.d/rc 4
104l5:5:wait:/etc/rc.d/init.d/rc 5
105l6:6:wait:/etc/rc.d/init.d/rc 6
106
107ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
108
109su:S016:once:/sbin/sulogin
110
1111:2345:respawn:/sbin/agetty tty1 9600
1122:2345:respawn:/sbin/agetty tty2 9600
1133:2345:respawn:/sbin/agetty tty3 9600
1144:2345:respawn:/sbin/agetty tty4 9600
1155:2345:respawn:/sbin/agetty tty5 9600
1166:2345:respawn:/sbin/agetty tty6 9600
117
118# End /etc/inittab</literal>
119EOF</userinput></screen>
120
121 </sect2>
122
123 <sect2 id="contents-sysvinit" role="content">
124 <title>Contents of Sysvinit</title>
125
126 <segmentedlist>
127 <segtitle>Installed programs</segtitle>
128
129 <seglistitem>
130 <seg>bootlogd, halt, init, killall5, last, lastb (link to last), mesg,
131 mountpoint, pidof (link to killall5), poweroff (link to halt),
132 reboot (link to halt), runlevel, shutdown, sulogin,
133 telinit (link to init), and utmpdump</seg>
134 </seglistitem>
135 </segmentedlist>
136
137 <variablelist>
138 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
139 <?dbfo list-presentation="list"?>
140 <?dbhtml list-presentation="table"?>
141
142 <varlistentry id="bootlogd">
143 <term><command>bootlogd</command></term>
144 <listitem>
145 <para>Logs boot messages to a log file</para>
146 <indexterm zone="ch-system-sysvinit bootlogd">
147 <primary sortas="b-bootlogd">bootlogd</primary>
148 </indexterm>
149 </listitem>
150 </varlistentry>
151
152 <varlistentry id="halt">
153 <term><command>halt</command></term>
154 <listitem>
155 <para>Normally invokes <command>shutdown</command> with the
156 <parameter>-h</parameter> option, except when already in run-level 0,
157 then it tells the kernel to halt the system; it notes in the
158 file <filename>/var/log/wtmp</filename> that the system is being
159 brought down</para>
160 <indexterm zone="ch-system-sysvinit halt">
161 <primary sortas="b-halt">halt</primary>
162 </indexterm>
163 </listitem>
164 </varlistentry>
165
166 <varlistentry id="init">
167 <term><command>init</command></term>
168 <listitem>
169 <para>The first process to be started when the kernel has initialized
170 the hardware which takes over the boot process and starts all the
171 proceses it is instructed to</para>
172 <indexterm zone="ch-system-sysvinit init">
173 <primary sortas="b-init">init</primary>
174 </indexterm>
175 </listitem>
176 </varlistentry>
177
178 <varlistentry id="killall5">
179 <term><command>killall5</command></term>
180 <listitem>
181 <para>Sends a signal to all processes, except the processes in its own
182 session so it will not kill the shell running the script that called
183 it</para>
184 <indexterm zone="ch-system-sysvinit killall5">
185 <primary sortas="b-killall5">killall5</primary>
186 </indexterm>
187 </listitem>
188 </varlistentry>
189
190 <varlistentry id="last">
191 <term><command>last</command></term>
192 <listitem>
193 <para>Shows which users last logged in (and out), searching back
194 through the <filename>/var/log/wtmp</filename> file; it also shows
195 system boots, shutdowns, and run-level changes</para>
196 <indexterm zone="ch-system-sysvinit last">
197 <primary sortas="b-last">last</primary>
198 </indexterm>
199 </listitem>
200 </varlistentry>
201
202 <varlistentry id="lastb">
203 <term><command>lastb</command></term>
204 <listitem>
205 <para>Shows the failed login attempts, as logged in
206 <filename>/var/log/btmp</filename></para>
207 <indexterm zone="ch-system-sysvinit lastb">
208 <primary sortas="b-lastb">lastb</primary>
209 </indexterm>
210 </listitem>
211 </varlistentry>
212
213 <varlistentry id="mesg">
214 <term><command>mesg</command></term>
215 <listitem>
216 <para>Controls whether other users can send messages to the current
217 user's terminal</para>
218 <indexterm zone="ch-system-sysvinit mesg">
219 <primary sortas="b-mesg">mesg</primary>
220 </indexterm>
221 </listitem>
222 </varlistentry>
223
224 <varlistentry id="mountpoint">
225 <term><command>mountpoint</command></term>
226 <listitem>
227 <para>Checks if the directory is a mountpoint</para>
228 <indexterm zone="ch-system-sysvinit mountpoint">
229 <primary sortas="b-mountpoint">mountpoint</primary>
230 </indexterm>
231 </listitem>
232 </varlistentry>
233
234 <varlistentry id="pidof">
235 <term><command>pidof</command></term>
236 <listitem>
237 <para>Reports the PIDs of the given programs</para>
238 <indexterm zone="ch-system-sysvinit pidof">
239 <primary sortas="b-pidof">pidof</primary>
240 </indexterm>
241 </listitem>
242 </varlistentry>
243
244 <varlistentry id="poweroff">
245 <term><command>poweroff</command></term>
246 <listitem>
247 <para>Tells the kernel to halt the system and switch off the computer
248 (see <command>halt</command>)</para>
249 <indexterm zone="ch-system-sysvinit poweroff">
250 <primary sortas="b-poweroff">poweroff</primary>
251 </indexterm>
252 </listitem>
253 </varlistentry>
254
255 <varlistentry id="reboot">
256 <term><command>reboot</command></term>
257 <listitem>
258 <para>Tells the kernel to reboot the system (see
259 <command>halt</command>)</para>
260 <indexterm zone="ch-system-sysvinit reboot">
261 <primary sortas="b-reboot">reboot</primary>
262 </indexterm>
263 </listitem>
264 </varlistentry>
265
266 <varlistentry id="runlevel">
267 <term><command>runlevel</command></term>
268 <listitem>
269 <para>Reports the previous and the current run-level, as noted in the
270 last run-level record in <filename>/var/run/utmp</filename></para>
271 <indexterm zone="ch-system-sysvinit runlevel">
272 <primary sortas="b-runlevel">runlevel</primary>
273 </indexterm>
274 </listitem>
275 </varlistentry>
276
277 <varlistentry id="shutdown">
278 <term><command>shutdown</command></term>
279 <listitem>
280 <para>Brings the system down in a secure way, signaling all processes
281 and notifying all logged-in users</para>
282 <indexterm zone="ch-system-sysvinit shutdown">
283 <primary sortas="b-shutdown">shutdown</primary>
284 </indexterm>
285 </listitem>
286 </varlistentry>
287
288 <varlistentry id="sulogin">
289 <term><command>sulogin</command></term>
290 <listitem>
291 <para>Allows <systemitem class="username">root</systemitem> to log in;
292 it is normally invoked by <command>init</command> when the system goes
293 into single user mode</para>
294 <indexterm zone="ch-system-sysvinit sulogin">
295 <primary sortas="b-sulogin">sulogin</primary>
296 </indexterm>
297 </listitem>
298 </varlistentry>
299
300 <varlistentry id="telinit">
301 <term><command>telinit</command></term>
302 <listitem>
303 <para>Tells <command>init</command> which run-level to change to</para>
304 <indexterm zone="ch-system-sysvinit telinit">
305 <primary sortas="b-telinit">telinit</primary>
306 </indexterm>
307 </listitem>
308 </varlistentry>
309
310 <varlistentry id="utmpdump">
311 <term><command>utmpdump</command></term>
312 <listitem>
313 <para>Displays the content of the given login file in a more
314 user-friendly format</para>
315 <indexterm zone="ch-system-sysvinit utmpdump">
316 <primary sortas="b-utmpdump">utmpdump</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.