source: chapter06/sysvinit.xml@ 0445a3d

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.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 0445a3d was 0445a3d, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

Added remap attributes to userinput tags in packages pages.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8389 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>Compile the package:</para>
59
60<screen><userinput remap="make">make -C src</userinput></screen>
61
62 <para>This package does not come with a test suite.</para>
63
64 <para>Install the package:</para>
65
66<screen><userinput remap="install">make -C src install</userinput></screen>
67
68 </sect2>
69
70 <sect2 id="conf-sysvinit" role="configuration">
71 <title>Configuring Sysvinit</title>
72
73 <indexterm zone="conf-sysvinit">
74 <primary sortas="a-Sysvinit">Sysvinit</primary>
75 <secondary>configuring</secondary>
76 </indexterm>
77
78 <indexterm zone="conf-sysvinit">
79 <primary sortas="e-/etc/inittab">/etc/inittab</primary>
80 </indexterm>
81
82 <para>Create a new file <filename>/etc/inittab</filename> by running the
83 following:</para>
84
85<screen><userinput>cat &gt; /etc/inittab &lt;&lt; "EOF"
86<literal># Begin /etc/inittab
87
88id:3:initdefault:
89
90si::sysinit:/etc/rc.d/init.d/rc sysinit
91
92l0:0:wait:/etc/rc.d/init.d/rc 0
93l1:S1:wait:/etc/rc.d/init.d/rc 1
94l2:2:wait:/etc/rc.d/init.d/rc 2
95l3:3:wait:/etc/rc.d/init.d/rc 3
96l4:4:wait:/etc/rc.d/init.d/rc 4
97l5:5:wait:/etc/rc.d/init.d/rc 5
98l6:6:wait:/etc/rc.d/init.d/rc 6
99
100ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
101
102su:S016:once:/sbin/sulogin
103
1041:2345:respawn:/sbin/agetty tty1 9600
1052:2345:respawn:/sbin/agetty tty2 9600
1063:2345:respawn:/sbin/agetty tty3 9600
1074:2345:respawn:/sbin/agetty tty4 9600
1085:2345:respawn:/sbin/agetty tty5 9600
1096:2345:respawn:/sbin/agetty tty6 9600
110
111# End /etc/inittab</literal>
112EOF</userinput></screen>
113
114 </sect2>
115
116 <sect2 id="contents-sysvinit" role="content">
117 <title>Contents of Sysvinit</title>
118
119 <segmentedlist>
120 <segtitle>Installed programs</segtitle>
121
122 <seglistitem>
123 <seg>bootlogd, halt, init, killall5, last, lastb (link to last), mesg,
124 mountpoint, pidof (link to killall5), poweroff (link to halt),
125 reboot (link to halt), runlevel, shutdown, sulogin,
126 telinit (link to init), utmpdump, and wall</seg>
127 </seglistitem>
128 </segmentedlist>
129
130 <variablelist>
131 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
132 <?dbfo list-presentation="list"?>
133 <?dbhtml list-presentation="table"?>
134
135 <varlistentry id="bootlogd">
136 <term><command>bootlogd</command></term>
137 <listitem>
138 <para>Logs boot messages to a log file</para>
139 <indexterm zone="ch-system-sysvinit bootlogd">
140 <primary sortas="b-bootlogd">bootlogd</primary>
141 </indexterm>
142 </listitem>
143 </varlistentry>
144
145 <varlistentry id="halt">
146 <term><command>halt</command></term>
147 <listitem>
148 <para>Normally invokes <command>shutdown</command> with the
149 <parameter>-h</parameter> option, except when already in run-level 0,
150 then it tells the kernel to halt the system; it notes in the
151 file <filename>/var/log/wtmp</filename> that the system is being
152 brought down</para>
153 <indexterm zone="ch-system-sysvinit halt">
154 <primary sortas="b-halt">halt</primary>
155 </indexterm>
156 </listitem>
157 </varlistentry>
158
159 <varlistentry id="init">
160 <term><command>init</command></term>
161 <listitem>
162 <para>The first process to be started when the kernel has initialized
163 the hardware which takes over the boot process and starts all the
164 proceses it is instructed to</para>
165 <indexterm zone="ch-system-sysvinit init">
166 <primary sortas="b-init">init</primary>
167 </indexterm>
168 </listitem>
169 </varlistentry>
170
171 <varlistentry id="killall5">
172 <term><command>killall5</command></term>
173 <listitem>
174 <para>Sends a signal to all processes, except the processes in its own
175 session so it will not kill the shell running the script that called
176 it</para>
177 <indexterm zone="ch-system-sysvinit killall5">
178 <primary sortas="b-killall5">killall5</primary>
179 </indexterm>
180 </listitem>
181 </varlistentry>
182
183 <varlistentry id="last">
184 <term><command>last</command></term>
185 <listitem>
186 <para>Shows which users last logged in (and out), searching back
187 through the <filename>/var/log/wtmp</filename> file; it also shows
188 system boots, shutdowns, and run-level changes</para>
189 <indexterm zone="ch-system-sysvinit last">
190 <primary sortas="b-last">last</primary>
191 </indexterm>
192 </listitem>
193 </varlistentry>
194
195 <varlistentry id="lastb">
196 <term><command>lastb</command></term>
197 <listitem>
198 <para>Shows the failed login attempts, as logged in
199 <filename>/var/log/btmp</filename></para>
200 <indexterm zone="ch-system-sysvinit lastb">
201 <primary sortas="b-lastb">lastb</primary>
202 </indexterm>
203 </listitem>
204 </varlistentry>
205
206 <varlistentry id="mesg">
207 <term><command>mesg</command></term>
208 <listitem>
209 <para>Controls whether other users can send messages to the current
210 user's terminal</para>
211 <indexterm zone="ch-system-sysvinit mesg">
212 <primary sortas="b-mesg">mesg</primary>
213 </indexterm>
214 </listitem>
215 </varlistentry>
216
217 <varlistentry id="mountpoint">
218 <term><command>mountpoint</command></term>
219 <listitem>
220 <para>Checks if the directory is a mountpoint</para>
221 <indexterm zone="ch-system-sysvinit mountpoint">
222 <primary sortas="b-mountpoint">mountpoint</primary>
223 </indexterm>
224 </listitem>
225 </varlistentry>
226
227 <varlistentry id="pidof">
228 <term><command>pidof</command></term>
229 <listitem>
230 <para>Reports the PIDs of the given programs</para>
231 <indexterm zone="ch-system-sysvinit pidof">
232 <primary sortas="b-pidof">pidof</primary>
233 </indexterm>
234 </listitem>
235 </varlistentry>
236
237 <varlistentry id="poweroff">
238 <term><command>poweroff</command></term>
239 <listitem>
240 <para>Tells the kernel to halt the system and switch off the computer
241 (see <command>halt</command>)</para>
242 <indexterm zone="ch-system-sysvinit poweroff">
243 <primary sortas="b-poweroff">poweroff</primary>
244 </indexterm>
245 </listitem>
246 </varlistentry>
247
248 <varlistentry id="reboot">
249 <term><command>reboot</command></term>
250 <listitem>
251 <para>Tells the kernel to reboot the system (see
252 <command>halt</command>)</para>
253 <indexterm zone="ch-system-sysvinit reboot">
254 <primary sortas="b-reboot">reboot</primary>
255 </indexterm>
256 </listitem>
257 </varlistentry>
258
259 <varlistentry id="runlevel">
260 <term><command>runlevel</command></term>
261 <listitem>
262 <para>Reports the previous and the current run-level, as noted in the
263 last run-level record in <filename>/var/run/utmp</filename></para>
264 <indexterm zone="ch-system-sysvinit runlevel">
265 <primary sortas="b-runlevel">runlevel</primary>
266 </indexterm>
267 </listitem>
268 </varlistentry>
269
270 <varlistentry id="shutdown">
271 <term><command>shutdown</command></term>
272 <listitem>
273 <para>Brings the system down in a secure way, signaling all processes
274 and notifying all logged-in users</para>
275 <indexterm zone="ch-system-sysvinit shutdown">
276 <primary sortas="b-shutdown">shutdown</primary>
277 </indexterm>
278 </listitem>
279 </varlistentry>
280
281 <varlistentry id="sulogin">
282 <term><command>sulogin</command></term>
283 <listitem>
284 <para>Allows <systemitem class="username">root</systemitem> to log in;
285 it is normally invoked by <command>init</command> when the system goes
286 into single user mode</para>
287 <indexterm zone="ch-system-sysvinit sulogin">
288 <primary sortas="b-sulogin">sulogin</primary>
289 </indexterm>
290 </listitem>
291 </varlistentry>
292
293 <varlistentry id="telinit">
294 <term><command>telinit</command></term>
295 <listitem>
296 <para>Tells <command>init</command> which run-level to change to</para>
297 <indexterm zone="ch-system-sysvinit telinit">
298 <primary sortas="b-telinit">telinit</primary>
299 </indexterm>
300 </listitem>
301 </varlistentry>
302
303 <varlistentry id="utmpdump">
304 <term><command>utmpdump</command></term>
305 <listitem>
306 <para>Displays the content of the given login file in a more
307 user-friendly format</para>
308 <indexterm zone="ch-system-sysvinit utmpdump">
309 <primary sortas="b-utmpdump">utmpdump</primary>
310 </indexterm>
311 </listitem>
312 </varlistentry>
313
314 <varlistentry id="wall">
315 <term><command>wall</command></term>
316 <listitem>
317 <para>Writes a message to all logged-in users</para>
318 <indexterm zone="ch-system-sysvinit wall">
319 <primary sortas="b-wall">wall</primary>
320 </indexterm>
321 </listitem>
322 </varlistentry>
323
324 </variablelist>
325
326 </sect2>
327
328</sect1>
Note: See TracBrowser for help on using the repository browser.