source: chapter06/sysvinit.xml@ ddd5542

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.3 6.4 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 ddd5542 was ddd5542, checked in by Manuel Canales Esparcia <manuel@…>, 18 years ago

Finished the XML indentation plus few tags changes.

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

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