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@& configured via /etc/inittab@g' \
|
---|
56 | src/init.c</userinput></screen>
|
---|
57 |
|
---|
58 | <para>Maintained versions of the <command>wall</command> and
|
---|
59 | <command>mountpoint</command> programs were
|
---|
60 | installed earlier by Util-linux. Suppress the installation of Sysvinit's
|
---|
61 | versions of these programs and their man pages:</para>
|
---|
62 |
|
---|
63 | <screen><userinput remap="make">sed -i -e 's/utmpdump wall/utmpdump/' \
|
---|
64 | -e '/= mountpoint/d' \
|
---|
65 | -e 's/mountpoint.1 wall.1//' src/Makefile</userinput></screen>
|
---|
66 |
|
---|
67 | <para>Compile the package:</para>
|
---|
68 |
|
---|
69 | <screen><userinput remap="make">make -C src</userinput></screen>
|
---|
70 |
|
---|
71 | <para>This package does not come with a test suite.</para>
|
---|
72 |
|
---|
73 | <para>Install the package:</para>
|
---|
74 |
|
---|
75 | <screen><userinput remap="install">make -C src install</userinput></screen>
|
---|
76 |
|
---|
77 | </sect2>
|
---|
78 |
|
---|
79 | <sect2 id="contents-sysvinit" role="content">
|
---|
80 | <title>Contents of Sysvinit</title>
|
---|
81 |
|
---|
82 | <segmentedlist>
|
---|
83 | <segtitle>Installed programs</segtitle>
|
---|
84 |
|
---|
85 | <seglistitem>
|
---|
86 | <seg>bootlogd, fstab-decode, halt, init, killall5, last,
|
---|
87 | lastb (link to last), mesg, pidof (link to killall5),
|
---|
88 | poweroff (link to halt), reboot (link to halt), runlevel, shutdown,
|
---|
89 | sulogin, telinit (link to init), and utmpdump</seg>
|
---|
90 | </seglistitem>
|
---|
91 | </segmentedlist>
|
---|
92 |
|
---|
93 | <variablelist>
|
---|
94 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
95 | <?dbfo list-presentation="list"?>
|
---|
96 | <?dbhtml list-presentation="table"?>
|
---|
97 |
|
---|
98 | <varlistentry id="bootlogd">
|
---|
99 | <term><command>bootlogd</command></term>
|
---|
100 | <listitem>
|
---|
101 | <para>Logs boot messages to a log file</para>
|
---|
102 | <indexterm zone="ch-system-sysvinit bootlogd">
|
---|
103 | <primary sortas="b-bootlogd">bootlogd</primary>
|
---|
104 | </indexterm>
|
---|
105 | </listitem>
|
---|
106 | </varlistentry>
|
---|
107 |
|
---|
108 | <varlistentry id="fstab-decode">
|
---|
109 | <term><command>fstab-decode</command></term>
|
---|
110 | <listitem>
|
---|
111 | <para>Run a command with fstab-encoded arguments</para>
|
---|
112 | <indexterm zone="ch-system-sysvinit fstab-decode">
|
---|
113 | <primary sortas="b-fstab-decode">fstab-decode</primary>
|
---|
114 | </indexterm>
|
---|
115 | </listitem>
|
---|
116 | </varlistentry>
|
---|
117 |
|
---|
118 | <varlistentry id="halt">
|
---|
119 | <term><command>halt</command></term>
|
---|
120 | <listitem>
|
---|
121 | <para>Normally invokes <command>shutdown</command> with the
|
---|
122 | <parameter>-h</parameter> option, except when already in run-level 0,
|
---|
123 | then it tells the kernel to halt the system; it notes in the
|
---|
124 | file <filename>/var/log/wtmp</filename> that the system is being
|
---|
125 | brought down</para>
|
---|
126 | <indexterm zone="ch-system-sysvinit halt">
|
---|
127 | <primary sortas="b-halt">halt</primary>
|
---|
128 | </indexterm>
|
---|
129 | </listitem>
|
---|
130 | </varlistentry>
|
---|
131 |
|
---|
132 | <varlistentry id="init">
|
---|
133 | <term><command>init</command></term>
|
---|
134 | <listitem>
|
---|
135 | <para>The first process to be started when the kernel has initialized
|
---|
136 | the hardware which takes over the boot process and starts all the
|
---|
137 | proceses it is instructed to</para>
|
---|
138 | <indexterm zone="ch-system-sysvinit init">
|
---|
139 | <primary sortas="b-init">init</primary>
|
---|
140 | </indexterm>
|
---|
141 | </listitem>
|
---|
142 | </varlistentry>
|
---|
143 |
|
---|
144 | <varlistentry id="killall5">
|
---|
145 | <term><command>killall5</command></term>
|
---|
146 | <listitem>
|
---|
147 | <para>Sends a signal to all processes, except the processes in its own
|
---|
148 | session so it will not kill the shell running the script that called
|
---|
149 | it</para>
|
---|
150 | <indexterm zone="ch-system-sysvinit killall5">
|
---|
151 | <primary sortas="b-killall5">killall5</primary>
|
---|
152 | </indexterm>
|
---|
153 | </listitem>
|
---|
154 | </varlistentry>
|
---|
155 |
|
---|
156 | <varlistentry id="last">
|
---|
157 | <term><command>last</command></term>
|
---|
158 | <listitem>
|
---|
159 | <para>Shows which users last logged in (and out), searching back
|
---|
160 | through the <filename>/var/log/wtmp</filename> file; it also shows
|
---|
161 | system boots, shutdowns, and run-level changes</para>
|
---|
162 | <indexterm zone="ch-system-sysvinit last">
|
---|
163 | <primary sortas="b-last">last</primary>
|
---|
164 | </indexterm>
|
---|
165 | </listitem>
|
---|
166 | </varlistentry>
|
---|
167 |
|
---|
168 | <varlistentry id="lastb">
|
---|
169 | <term><command>lastb</command></term>
|
---|
170 | <listitem>
|
---|
171 | <para>Shows the failed login attempts, as logged in
|
---|
172 | <filename>/var/log/btmp</filename></para>
|
---|
173 | <indexterm zone="ch-system-sysvinit lastb">
|
---|
174 | <primary sortas="b-lastb">lastb</primary>
|
---|
175 | </indexterm>
|
---|
176 | </listitem>
|
---|
177 | </varlistentry>
|
---|
178 |
|
---|
179 | <varlistentry id="mesg">
|
---|
180 | <term><command>mesg</command></term>
|
---|
181 | <listitem>
|
---|
182 | <para>Controls whether other users can send messages to the current
|
---|
183 | user's terminal</para>
|
---|
184 | <indexterm zone="ch-system-sysvinit mesg">
|
---|
185 | <primary sortas="b-mesg">mesg</primary>
|
---|
186 | </indexterm>
|
---|
187 | </listitem>
|
---|
188 | </varlistentry>
|
---|
189 |
|
---|
190 | <varlistentry id="pidof">
|
---|
191 | <term><command>pidof</command></term>
|
---|
192 | <listitem>
|
---|
193 | <para>Reports the PIDs of the given programs</para>
|
---|
194 | <indexterm zone="ch-system-sysvinit pidof">
|
---|
195 | <primary sortas="b-pidof">pidof</primary>
|
---|
196 | </indexterm>
|
---|
197 | </listitem>
|
---|
198 | </varlistentry>
|
---|
199 |
|
---|
200 | <varlistentry id="poweroff">
|
---|
201 | <term><command>poweroff</command></term>
|
---|
202 | <listitem>
|
---|
203 | <para>Tells the kernel to halt the system and switch off the computer
|
---|
204 | (see <command>halt</command>)</para>
|
---|
205 | <indexterm zone="ch-system-sysvinit poweroff">
|
---|
206 | <primary sortas="b-poweroff">poweroff</primary>
|
---|
207 | </indexterm>
|
---|
208 | </listitem>
|
---|
209 | </varlistentry>
|
---|
210 |
|
---|
211 | <varlistentry id="reboot">
|
---|
212 | <term><command>reboot</command></term>
|
---|
213 | <listitem>
|
---|
214 | <para>Tells the kernel to reboot the system (see
|
---|
215 | <command>halt</command>)</para>
|
---|
216 | <indexterm zone="ch-system-sysvinit reboot">
|
---|
217 | <primary sortas="b-reboot">reboot</primary>
|
---|
218 | </indexterm>
|
---|
219 | </listitem>
|
---|
220 | </varlistentry>
|
---|
221 |
|
---|
222 | <varlistentry id="runlevel">
|
---|
223 | <term><command>runlevel</command></term>
|
---|
224 | <listitem>
|
---|
225 | <para>Reports the previous and the current run-level, as noted in the
|
---|
226 | last run-level record in <filename>/var/run/utmp</filename></para>
|
---|
227 | <indexterm zone="ch-system-sysvinit runlevel">
|
---|
228 | <primary sortas="b-runlevel">runlevel</primary>
|
---|
229 | </indexterm>
|
---|
230 | </listitem>
|
---|
231 | </varlistentry>
|
---|
232 |
|
---|
233 | <varlistentry id="shutdown">
|
---|
234 | <term><command>shutdown</command></term>
|
---|
235 | <listitem>
|
---|
236 | <para>Brings the system down in a secure way, signaling all processes
|
---|
237 | and notifying all logged-in users</para>
|
---|
238 | <indexterm zone="ch-system-sysvinit shutdown">
|
---|
239 | <primary sortas="b-shutdown">shutdown</primary>
|
---|
240 | </indexterm>
|
---|
241 | </listitem>
|
---|
242 | </varlistentry>
|
---|
243 |
|
---|
244 | <varlistentry id="sulogin">
|
---|
245 | <term><command>sulogin</command></term>
|
---|
246 | <listitem>
|
---|
247 | <para>Allows <systemitem class="username">root</systemitem> to log in;
|
---|
248 | it is normally invoked by <command>init</command> when the system goes
|
---|
249 | into single user mode</para>
|
---|
250 | <indexterm zone="ch-system-sysvinit sulogin">
|
---|
251 | <primary sortas="b-sulogin">sulogin</primary>
|
---|
252 | </indexterm>
|
---|
253 | </listitem>
|
---|
254 | </varlistentry>
|
---|
255 |
|
---|
256 | <varlistentry id="telinit">
|
---|
257 | <term><command>telinit</command></term>
|
---|
258 | <listitem>
|
---|
259 | <para>Tells <command>init</command> which run-level to change to</para>
|
---|
260 | <indexterm zone="ch-system-sysvinit telinit">
|
---|
261 | <primary sortas="b-telinit">telinit</primary>
|
---|
262 | </indexterm>
|
---|
263 | </listitem>
|
---|
264 | </varlistentry>
|
---|
265 |
|
---|
266 | <varlistentry id="utmpdump">
|
---|
267 | <term><command>utmpdump</command></term>
|
---|
268 | <listitem>
|
---|
269 | <para>Displays the content of the given login file in a more
|
---|
270 | user-friendly format</para>
|
---|
271 | <indexterm zone="ch-system-sysvinit utmpdump">
|
---|
272 | <primary sortas="b-utmpdump">utmpdump</primary>
|
---|
273 | </indexterm>
|
---|
274 | </listitem>
|
---|
275 | </varlistentry>
|
---|
276 |
|
---|
277 | </variablelist>
|
---|
278 |
|
---|
279 | </sect2>
|
---|
280 |
|
---|
281 | </sect1>
|
---|