source: chapter06/sysvinit.xml@ 6397354

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 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 6397354 was e1428f3, checked in by Bruce Dubbs <bdubbs@…>, 13 years ago

Upgrade to Util-linux-2.19. Changed name from util-linux-ng.

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

  • Property mode set to 100644
File size: 11.3 KB
RevLine 
[673b0d8]1<?xml version="1.0" encoding="ISO-8859-1"?>
[b06ca36]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[673b0d8]4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
6]>
[ddd5542]7
[81fd230]8<sect1 id="ch-system-sysvinit" role="wrap">
[ddd5542]9 <?dbhtml filename="sysvinit.html"?>
10
[e747759]11 <sect1info condition="script">
12 <productname>sysvinit</productname>
13 <productnumber>&sysvinit-version;</productnumber>
14 <address>&sysvinit-url;</address>
15 </sect1info>
16
[ddd5542]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>
[e4a5635]34 <seg>&sysvinit-ch6-sbu;</seg>
35 <seg>&sysvinit-ch6-du;</seg>
[ddd5542]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
[12a2975c]52 <quote>Sending processes configured via /etc/inittab the TERM signal</quote>
[ddd5542]53 instead:</para>
[73aedd1d]54
[0445a3d]55<screen><userinput remap="pre">sed -i 's@Sending processes@&amp; configured via /etc/inittab@g' \
[2ec4b60]56 src/init.c</userinput></screen>
[73aedd1d]57
[fe6ca49]58 <para>A maintained version of the <command>wall</command> program was
[e1428f3]59 installed earlier by Util-linux. Suppress the installation of Sysvinit's
[fe6ca49]60 version of this program and its man page:</para>
[e38671e]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
[ddd5542]65 <para>Compile the package:</para>
[73aedd1d]66
[0445a3d]67<screen><userinput remap="make">make -C src</userinput></screen>
[73aedd1d]68
[ddd5542]69 <para>This package does not come with a test suite.</para>
[0be3d41]70
[ddd5542]71 <para>Install the package:</para>
[73aedd1d]72
[0445a3d]73<screen><userinput remap="install">make -C src install</userinput></screen>
[73aedd1d]74
[ddd5542]75 </sect2>
[5888299]76
[ddd5542]77 <sect2 id="conf-sysvinit" role="configuration">
78 <title>Configuring Sysvinit</title>
[342b176]79
[ddd5542]80 <indexterm zone="conf-sysvinit">
81 <primary sortas="a-Sysvinit">Sysvinit</primary>
82 <secondary>configuring</secondary>
83 </indexterm>
[81fd230]84
[ddd5542]85 <indexterm zone="conf-sysvinit">
86 <primary sortas="e-/etc/inittab">/etc/inittab</primary>
87 </indexterm>
[673b0d8]88
[ddd5542]89 <para>Create a new file <filename>/etc/inittab</filename> by running the
90 following:</para>
[342b176]91
[8ad7980]92<screen><userinput>cat &gt; /etc/inittab &lt;&lt; "EOF"
[d72e04a]93<literal># Begin /etc/inittab
[342b176]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
[fa21b3d]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
[342b176]117
[d72e04a]118# End /etc/inittab</literal>
[8ad7980]119EOF</userinput></screen>
[673b0d8]120
[ddd5542]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>
[b188c43]130 <seg>bootlogd, fstab-decode, halt, init, killall5, last,
131 lastb (link to last), mesg, mountpoint, pidof (link to killall5),
132 poweroff (link to halt),
[8bc46a5]133 reboot (link to halt), runlevel, shutdown, sulogin,
[fd4ae4e]134 telinit (link to init), and utmpdump</seg>
[ddd5542]135 </seglistitem>
136 </segmentedlist>
137
138 <variablelist>
139 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
140 <?dbfo list-presentation="list"?>
141 <?dbhtml list-presentation="table"?>
142
[8bc46a5]143 <varlistentry id="bootlogd">
144 <term><command>bootlogd</command></term>
145 <listitem>
146 <para>Logs boot messages to a log file</para>
147 <indexterm zone="ch-system-sysvinit bootlogd">
148 <primary sortas="b-bootlogd">bootlogd</primary>
149 </indexterm>
150 </listitem>
151 </varlistentry>
152
[b188c43]153 <varlistentry id="fstab-decode">
154 <term><command>fstab-decode</command></term>
155 <listitem>
156 <para>Run a command with fstab-encoded arguments</para>
157 <indexterm zone="ch-system-sysvinit fstab-decode">
158 <primary sortas="b-fstab-decode">fstab-decode</primary>
159 </indexterm>
160 </listitem>
161 </varlistentry>
162
[ddd5542]163 <varlistentry id="halt">
164 <term><command>halt</command></term>
165 <listitem>
166 <para>Normally invokes <command>shutdown</command> with the
167 <parameter>-h</parameter> option, except when already in run-level 0,
168 then it tells the kernel to halt the system; it notes in the
169 file <filename>/var/log/wtmp</filename> that the system is being
170 brought down</para>
171 <indexterm zone="ch-system-sysvinit halt">
172 <primary sortas="b-halt">halt</primary>
173 </indexterm>
174 </listitem>
175 </varlistentry>
176
177 <varlistentry id="init">
178 <term><command>init</command></term>
179 <listitem>
180 <para>The first process to be started when the kernel has initialized
181 the hardware which takes over the boot process and starts all the
182 proceses it is instructed to</para>
183 <indexterm zone="ch-system-sysvinit init">
184 <primary sortas="b-init">init</primary>
185 </indexterm>
186 </listitem>
187 </varlistentry>
188
189 <varlistentry id="killall5">
190 <term><command>killall5</command></term>
191 <listitem>
192 <para>Sends a signal to all processes, except the processes in its own
193 session so it will not kill the shell running the script that called
194 it</para>
195 <indexterm zone="ch-system-sysvinit killall5">
196 <primary sortas="b-killall5">killall5</primary>
197 </indexterm>
198 </listitem>
199 </varlistentry>
200
201 <varlistentry id="last">
202 <term><command>last</command></term>
203 <listitem>
204 <para>Shows which users last logged in (and out), searching back
205 through the <filename>/var/log/wtmp</filename> file; it also shows
206 system boots, shutdowns, and run-level changes</para>
207 <indexterm zone="ch-system-sysvinit last">
208 <primary sortas="b-last">last</primary>
209 </indexterm>
210 </listitem>
211 </varlistentry>
212
213 <varlistentry id="lastb">
214 <term><command>lastb</command></term>
215 <listitem>
216 <para>Shows the failed login attempts, as logged in
217 <filename>/var/log/btmp</filename></para>
218 <indexterm zone="ch-system-sysvinit lastb">
219 <primary sortas="b-lastb">lastb</primary>
220 </indexterm>
221 </listitem>
222 </varlistentry>
223
224 <varlistentry id="mesg">
225 <term><command>mesg</command></term>
226 <listitem>
227 <para>Controls whether other users can send messages to the current
228 user's terminal</para>
229 <indexterm zone="ch-system-sysvinit mesg">
230 <primary sortas="b-mesg">mesg</primary>
231 </indexterm>
232 </listitem>
233 </varlistentry>
234
235 <varlistentry id="mountpoint">
236 <term><command>mountpoint</command></term>
237 <listitem>
238 <para>Checks if the directory is a mountpoint</para>
239 <indexterm zone="ch-system-sysvinit mountpoint">
240 <primary sortas="b-mountpoint">mountpoint</primary>
241 </indexterm>
242 </listitem>
243 </varlistentry>
244
245 <varlistentry id="pidof">
246 <term><command>pidof</command></term>
247 <listitem>
248 <para>Reports the PIDs of the given programs</para>
249 <indexterm zone="ch-system-sysvinit pidof">
250 <primary sortas="b-pidof">pidof</primary>
251 </indexterm>
252 </listitem>
253 </varlistentry>
254
255 <varlistentry id="poweroff">
256 <term><command>poweroff</command></term>
257 <listitem>
258 <para>Tells the kernel to halt the system and switch off the computer
259 (see <command>halt</command>)</para>
260 <indexterm zone="ch-system-sysvinit poweroff">
261 <primary sortas="b-poweroff">poweroff</primary>
262 </indexterm>
263 </listitem>
264 </varlistentry>
265
266 <varlistentry id="reboot">
267 <term><command>reboot</command></term>
268 <listitem>
269 <para>Tells the kernel to reboot the system (see
270 <command>halt</command>)</para>
271 <indexterm zone="ch-system-sysvinit reboot">
272 <primary sortas="b-reboot">reboot</primary>
273 </indexterm>
274 </listitem>
275 </varlistentry>
276
277 <varlistentry id="runlevel">
278 <term><command>runlevel</command></term>
279 <listitem>
280 <para>Reports the previous and the current run-level, as noted in the
281 last run-level record in <filename>/var/run/utmp</filename></para>
282 <indexterm zone="ch-system-sysvinit runlevel">
283 <primary sortas="b-runlevel">runlevel</primary>
284 </indexterm>
285 </listitem>
286 </varlistentry>
287
288 <varlistentry id="shutdown">
289 <term><command>shutdown</command></term>
290 <listitem>
291 <para>Brings the system down in a secure way, signaling all processes
292 and notifying all logged-in users</para>
293 <indexterm zone="ch-system-sysvinit shutdown">
294 <primary sortas="b-shutdown">shutdown</primary>
295 </indexterm>
296 </listitem>
297 </varlistentry>
298
299 <varlistentry id="sulogin">
300 <term><command>sulogin</command></term>
301 <listitem>
302 <para>Allows <systemitem class="username">root</systemitem> to log in;
303 it is normally invoked by <command>init</command> when the system goes
304 into single user mode</para>
305 <indexterm zone="ch-system-sysvinit sulogin">
306 <primary sortas="b-sulogin">sulogin</primary>
307 </indexterm>
308 </listitem>
309 </varlistentry>
310
311 <varlistentry id="telinit">
312 <term><command>telinit</command></term>
313 <listitem>
314 <para>Tells <command>init</command> which run-level to change to</para>
315 <indexterm zone="ch-system-sysvinit telinit">
316 <primary sortas="b-telinit">telinit</primary>
317 </indexterm>
318 </listitem>
319 </varlistentry>
320
321 <varlistentry id="utmpdump">
322 <term><command>utmpdump</command></term>
323 <listitem>
324 <para>Displays the content of the given login file in a more
325 user-friendly format</para>
326 <indexterm zone="ch-system-sysvinit utmpdump">
327 <primary sortas="b-utmpdump">utmpdump</primary>
328 </indexterm>
329 </listitem>
330 </varlistentry>
331
332 </variablelist>
333
334 </sect2>
[81fd230]335
[ddd5542]336</sect1>
Note: See TracBrowser for help on using the repository browser.