source: chapter06/sysvinit.xml@ cba2d4e

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.6 7.7 7.8 7.9 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 cba2d4e was cba2d4e, checked in by Bruce Dubbs <bdubbs@…>, 10 years ago

Added systemd and dbus to the book.
Set up systemd and System V side-by-side with the
ability to reboot to either system.

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

  • Property mode set to 100644
File size: 8.2 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<!--
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 configured via /etc/inittab the TERM signal</quote>
54 instead:</para>
55
56<screen><userinput remap="pre">sed -i 's@Sending processes@&amp; configured via /etc/inittab@g' src/init.c</userinput></screen>
57
58 <para>Maintained versions of the <command>wall</command>,
59 <command>mountpoint</command>, <command>last</command>,
60 <command>mesg</command>, <command>sulogin</command>, and
61 <command>utmpdump</command> programs were installed earlier by Util-linux.
62 Suppress the installation of Sysvinit's versions of these programs and
63 their man pages:</para>
64
65<screen><userinput remap="make">sed -ri -e '/utmpdump/d' \
66 -e '/mountpoint/d' \
67 -e '/mesg/d' \
68 -e 's/= sulogin(\.8)?/=/' src/Makefile</userinput></screen>
69-->
70 <para>First, apply a patch that removes several programs installed by other
71 packages, clarifies a message, and fixes a compiler warning:</para>
72
73<screen><userinput remap="pre">patch -Np1 -i ../&sysvinit-consolidated-patch;</userinput></screen>
74
75 <para>Compile the package:</para>
76
77<screen><userinput remap="make">make -C src</userinput></screen>
78
79 <para>This package does not come with a test suite.</para>
80
81 <para>Install the package:</para>
82
83<screen><userinput remap="install">make -C src install</userinput></screen>
84
85 <para>Move files that have a name conflict with <xref linkend="ch-system-systemd"/>
86 so that both packages can be installed side-by-side:</para>
87
88<screen><userinput remap="install">for p in init halt poweroff reboot runlevel shutdown telinit; do
89 mv -v /sbin/$p /sbin/$p-sysv
90 mv -v /usr/share/man/man8/$p.8 /usr/share/man/man8/$p-sysv.8
91done</userinput></screen>
92
93 </sect2>
94
95 <sect2 id="contents-sysvinit" role="content">
96 <title>Contents of Sysvinit</title>
97
98 <segmentedlist>
99 <segtitle>Installed programs</segtitle>
100
101 <seglistitem>
102 <seg>bootlogd, fstab-decode, halt, init, killall5,
103 poweroff (link to halt), reboot (link to halt), runlevel,
104 shutdown, and telinit (link to init)</seg>
105 </seglistitem>
106 </segmentedlist>
107
108 <variablelist>
109 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
110 <?dbfo list-presentation="list"?>
111 <?dbhtml list-presentation="table"?>
112
113 <varlistentry id="bootlogd">
114 <term><command>bootlogd</command></term>
115 <listitem>
116 <para>Logs boot messages to a log file</para>
117 <indexterm zone="ch-system-sysvinit bootlogd">
118 <primary sortas="b-bootlogd">bootlogd</primary>
119 </indexterm>
120 </listitem>
121 </varlistentry>
122
123 <varlistentry id="fstab-decode">
124 <term><command>fstab-decode</command></term>
125 <listitem>
126 <para>Run a command with fstab-encoded arguments</para>
127 <indexterm zone="ch-system-sysvinit fstab-decode">
128 <primary sortas="b-fstab-decode">fstab-decode</primary>
129 </indexterm>
130 </listitem>
131 </varlistentry>
132
133 <varlistentry id="halt-sysv">
134 <term><command>halt</command></term>
135 <listitem>
136 <para>Normally invokes <command>shutdown</command> with the
137 <parameter>-h</parameter> option, except when already in run-level 0,
138 then it tells the kernel to halt the system; it notes in the
139 file <filename>/var/log/wtmp</filename> that the system is being
140 brought down</para>
141 <indexterm zone="ch-system-sysvinit halt-sysv">
142 <primary sortas="b-halt">halt</primary>
143 </indexterm>
144 </listitem>
145 </varlistentry>
146
147 <varlistentry id="init-sysv">
148 <term><command>init</command></term>
149 <listitem>
150 <para>The first process to be started when the kernel has initialized
151 the hardware which takes over the boot process and starts all the
152 proceses it is instructed to</para>
153 <indexterm zone="ch-system-sysvinit init-sysv">
154 <primary sortas="b-init">init</primary>
155 </indexterm>
156 </listitem>
157 </varlistentry>
158
159 <varlistentry id="killall5">
160 <term><command>killall5</command></term>
161 <listitem>
162 <para>Sends a signal to all processes, except the processes in its own
163 session so it will not kill the shell running the script that called
164 it</para>
165 <indexterm zone="ch-system-sysvinit killall5">
166 <primary sortas="b-killall5">killall5</primary>
167 </indexterm>
168 </listitem>
169 </varlistentry>
170
171 <varlistentry id="poweroff-sysv">
172 <term><command>poweroff</command></term>
173 <listitem>
174 <para>Tells the kernel to halt the system and switch off the computer
175 (see <command>halt</command>)</para>
176 <indexterm zone="ch-system-sysvinit poweroff-sysv">
177 <primary sortas="b-poweroff">poweroff</primary>
178 </indexterm>
179 </listitem>
180 </varlistentry>
181
182 <varlistentry id="reboot-sysv">
183 <term><command>reboot</command></term>
184 <listitem>
185 <para>Tells the kernel to reboot the system (see
186 <command>halt</command>)</para>
187 <indexterm zone="ch-system-sysvinit reboot-sysv">
188 <primary sortas="b-reboot">reboot</primary>
189 </indexterm>
190 </listitem>
191 </varlistentry>
192
193 <varlistentry id="runlevel-sysv">
194 <term><command>runlevel</command></term>
195 <listitem>
196 <para>Reports the previous and the current run-level, as noted in the
197 last run-level record in <filename>/var/run/utmp</filename></para>
198 <indexterm zone="ch-system-sysvinit runlevel-sysv">
199 <primary sortas="b-runlevel">runlevel</primary>
200 </indexterm>
201 </listitem>
202 </varlistentry>
203
204 <varlistentry id="shutdown-sysv">
205 <term><command>shutdown</command></term>
206 <listitem>
207 <para>Brings the system down in a secure way, signaling all processes
208 and notifying all logged-in users</para>
209 <indexterm zone="ch-system-sysvinit shutdown-sysv">
210 <primary sortas="b-shutdown">shutdown</primary>
211 </indexterm>
212 </listitem>
213 </varlistentry>
214
215 <varlistentry id="telinit-sysv">
216 <term><command>telinit</command></term>
217 <listitem>
218 <para>Tells <command>init</command> which run-level to change to</para>
219 <indexterm zone="ch-system-sysvinit telinit-sysv">
220 <primary sortas="b-telinit">telinit</primary>
221 </indexterm>
222 </listitem>
223 </varlistentry>
224
225 </variablelist>
226
227 </sect2>
228
229</sect1>
Note: See TracBrowser for help on using the repository browser.