source: BOOK/final-system/common/sysvinit.xml@ 2b220db9

clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 2b220db9 was 2b220db9, checked in by Chris Staub <chris@…>, 12 years ago

Updates to installed programs lists

  • Property mode set to 100644
File size: 10.3 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<sect1 id="ch-system-sysvinit" role="wrap">
8 <?dbhtml filename="sysvinit.html"?>
9
10 <title>Sysvinit-&sysvinit-version;</title>
11
12 <indexterm zone="ch-system-sysvinit">
13 <primary sortas="a-Sysvinit">Sysvinit</primary>
14 </indexterm>
15
16 <sect2 role="package">
17 <title/>
18
19 <para>The Sysvinit package contains programs for controlling the startup,
20 running, and shutdown of the system.</para>
21
22 </sect2>
23
24 <sect2 role="installation">
25 <title>Installation of Sysvinit</title>
26
27<para os ="a">Apply a sed which removes sulogin, mountpoint, and wall from being built and installed as they are provided by util-linux:</para>
28
29<screen os="b"><userinput>cp -v src/Makefile{,.orig}
30sed -e 's/\ sulogin//;s/\ sulogin.8//' \
31 -e '/sulogin.*:/d' '/utmpdump/d' \
32 -e '/mountpoint/d' src/Makefile.orig > src/Makefile</userinput></screen>
33
34<para os ="c">Compile the package:</para>
35
36<screen os="d"><userinput>make -C src clobber
37make -C src</userinput></screen>
38
39 <para os="e">Install the package:</para>
40
41<screen os="f"><userinput>make -C src install</userinput></screen>
42
43 </sect2>
44
45 <sect2 id="conf-sysvinit" role="configuration">
46 <title>Configuring Sysvinit</title>
47
48 <indexterm zone="conf-sysvinit">
49 <primary sortas="a-Sysvinit">Sysvinit</primary>
50 <secondary>configuring</secondary></indexterm>
51
52 <indexterm zone="conf-sysvinit">
53 <primary sortas="e-/etc/inittab">/etc/inittab</primary>
54 </indexterm>
55
56 <para>Create a new file <filename>/etc/inittab</filename> by running the
57 following:</para>
58
59<screen><userinput>cat &gt; /etc/inittab &lt;&lt; "EOF"
60<literal># Begin /etc/inittab
61
62id:3:initdefault:
63
64si::sysinit:/etc/rc.d/init.d/rc sysinit
65
66l0:0:wait:/etc/rc.d/init.d/rc 0
67l1:S1:wait:/etc/rc.d/init.d/rc 1
68l2:2:wait:/etc/rc.d/init.d/rc 2
69l3:3:wait:/etc/rc.d/init.d/rc 3
70l4:4:wait:/etc/rc.d/init.d/rc 4
71l5:5:wait:/etc/rc.d/init.d/rc 5
72l6:6:wait:/etc/rc.d/init.d/rc 6
73
74ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
75
76su:S016:once:/sbin/sulogin
77</literal>
78EOF</userinput></screen>
79
80 <para>The following command adds the standard virtual terminals to
81 <filename>/etc/inittab</filename>. If your system only has a serial
82 console skip the following command:</para>
83
84<screen><userinput>cat &gt;&gt; /etc/inittab &lt;&lt; "EOF"
85<literal>1:2345:respawn:/sbin/agetty -I '\033(K' tty1 9600
862:2345:respawn:/sbin/agetty -I '\033(K' tty2 9600
873:2345:respawn:/sbin/agetty -I '\033(K' tty3 9600
884:2345:respawn:/sbin/agetty -I '\033(K' tty4 9600
895:2345:respawn:/sbin/agetty -I '\033(K' tty5 9600
906:2345:respawn:/sbin/agetty -I '\033(K' tty6 9600
91</literal>
92EOF</userinput></screen>
93
94 <para>If your system has a serial console run the following command to add
95 the entry to <filename>/etc/inittab</filename>:</para>
96
97<screen><userinput>cat &gt;&gt; /etc/inittab &lt;&lt; "EOF"
98<literal>c0:12345:respawn:/sbin/agetty 115200 ttyS0 vt100
99</literal>
100EOF</userinput></screen>
101
102 <para>Finally, add the end line to <filename>/etc/inittab</filename>:</para>
103
104<screen><userinput>cat &gt;&gt; /etc/inittab &lt;&lt; "EOF"
105<literal># End /etc/inittab</literal>
106EOF</userinput></screen>
107
108 <para>The <parameter>-I '\033(K'</parameter> option tells
109 <command>agetty</command> to send this escape sequence to the terminal
110 before doing anything else. This escape sequence switches the console
111 character set to a user-defined one, which can be modified by running
112 the <command>setfont</command> program. The <command>console</command>
113 initscript from the CLFS-Bootscripts package calls the
114 <command>setfont</command> program during system startup. Sending this
115 escape sequence is necessary for people who use non-ISO 8859-1 screen
116 fonts, but it does not affect native English speakers.</para>
117
118 </sect2>
119
120 <sect2 id="contents-sysvinit" role="content">
121 <title>Contents of Sysvinit</title>
122
123 <segmentedlist>
124 <segtitle>Installed programs</segtitle>
125
126 <seglistitem>
127 <seg>bootlogd, fstab-decode, halt, init, killall5, last, lastb (link
128 to last), mesg,
129 pidof (link to killall5), poweroff (link to halt),
130 reboot (link to halt), runlevel, shutdown, and telinit (link to init)</seg>
131 </seglistitem>
132 </segmentedlist>
133
134 <variablelist>
135 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
136 <?dbfo list-presentation="list"?>
137 <?dbhtml list-presentation="table"?>
138
139 <varlistentry id="bootlogd">
140 <term><command>bootlogd</command></term>
141 <listitem>
142 <para>Logs boot messages to a log file</para>
143 <indexterm zone="ch-system-sysvinit bootlogd">
144 <primary sortas="b-bootlogd">bootlogd</primary>
145 </indexterm>
146 </listitem>
147 </varlistentry>
148
149 <varlistentry id="fstab-decode">
150 <term><command>fstab-decode</command></term>
151 <listitem>
152 <para>Runs a command with fstab-encoded arguments</para>
153 <indexterm zone="ch-system-sysvinit fstab-decode">
154 <primary sortas="b-fstab-decode">fstab-decode</primary>
155 </indexterm>
156 </listitem>
157 </varlistentry>
158
159 <varlistentry id="halt">
160 <term><command>halt</command></term>
161 <listitem>
162 <para>Normally invokes <command>shutdown</command> with the
163 <parameter>-h</parameter> option, except when already in run-level 0,
164 then it tells the kernel to halt the system; it notes in the
165 file <filename>/var/log/wtmp</filename> that the system is being
166 brought down</para>
167 <indexterm zone="ch-system-sysvinit halt">
168 <primary sortas="b-halt">halt</primary>
169 </indexterm>
170 </listitem>
171 </varlistentry>
172
173 <varlistentry id="init">
174 <term><command>init</command></term>
175 <listitem>
176 <para>The first process to be started when the kernel has initialized
177 the hardware which takes over the boot process and starts all the
178 proceses it is instructed to</para>
179 <indexterm zone="ch-system-sysvinit init">
180 <primary sortas="b-init">init</primary>
181 </indexterm>
182 </listitem>
183 </varlistentry>
184
185 <varlistentry id="killall5">
186 <term><command>killall5</command></term>
187 <listitem>
188 <para>Sends a signal to all processes, except the processes in its own
189 session so it will not kill the shell running the script that called
190 it</para>
191 <indexterm zone="ch-system-sysvinit killall5">
192 <primary sortas="b-killall5">killall5</primary>
193 </indexterm>
194 </listitem>
195 </varlistentry>
196
197 <varlistentry id="last">
198 <term><command>last</command></term>
199 <listitem>
200 <para>Shows which users last logged in (and out), searching back
201 through the <filename>/var/log/wtmp</filename> file; it also shows
202 system boots, shutdowns, and run-level changes</para>
203 <indexterm zone="ch-system-sysvinit last">
204 <primary sortas="b-last">last</primary>
205 </indexterm>
206 </listitem>
207 </varlistentry>
208
209 <varlistentry id="lastb">
210 <term><command>lastb</command></term>
211 <listitem>
212 <para>Shows the failed login attempts, as logged in
213 <filename>/var/log/btmp</filename></para>
214 <indexterm zone="ch-system-sysvinit lastb">
215 <primary sortas="b-lastb">lastb</primary>
216 </indexterm>
217 </listitem>
218 </varlistentry>
219
220 <varlistentry id="mesg">
221 <term><command>mesg</command></term>
222 <listitem>
223 <para>Controls whether other users can send messages to the current
224 user's terminal</para>
225 <indexterm zone="ch-system-sysvinit mesg">
226 <primary sortas="b-mesg">mesg</primary>
227 </indexterm>
228 </listitem>
229 </varlistentry>
230
231 <varlistentry id="pidof">
232 <term><command>pidof</command></term>
233 <listitem>
234 <para>Reports the PIDs of the given programs</para>
235 <indexterm zone="ch-system-sysvinit pidof">
236 <primary sortas="b-pidof">pidof</primary>
237 </indexterm>
238 </listitem>
239 </varlistentry>
240
241 <varlistentry id="poweroff">
242 <term><command>poweroff</command></term>
243 <listitem>
244 <para>Tells the kernel to halt the system and switch off the computer
245 (see <command>halt</command>)</para>
246 <indexterm zone="ch-system-sysvinit poweroff">
247 <primary sortas="b-poweroff">poweroff</primary>
248 </indexterm>
249 </listitem>
250 </varlistentry>
251
252 <varlistentry id="reboot">
253 <term><command>reboot</command></term>
254 <listitem>
255 <para>Tells the kernel to reboot the system (see
256 <command>halt</command>)</para>
257 <indexterm zone="ch-system-sysvinit reboot">
258 <primary sortas="b-reboot">reboot</primary>
259 </indexterm>
260 </listitem>
261 </varlistentry>
262
263 <varlistentry id="runlevel">
264 <term><command>runlevel</command></term>
265 <listitem>
266 <para>Reports the previous and the current run-level, as noted in
267 the last run-level record in <filename>/var/run/utmp</filename></para>
268 <indexterm zone="ch-system-sysvinit runlevel">
269 <primary sortas="b-runlevel">runlevel</primary>
270 </indexterm>
271 </listitem>
272 </varlistentry>
273
274 <varlistentry id="shutdown">
275 <term><command>shutdown</command></term>
276 <listitem>
277 <para>Brings the system down in a secure way, signaling all processes
278 and notifying all logged-in users</para>
279 <indexterm zone="ch-system-sysvinit shutdown">
280 <primary sortas="b-shutdown">shutdown</primary>
281 </indexterm>
282 </listitem>
283 </varlistentry>
284
285 <varlistentry id="telinit">
286 <term><command>telinit</command></term>
287 <listitem>
288 <para>Tells <command>init</command> which run-level to change to</para>
289 <indexterm zone="ch-system-sysvinit telinit">
290 <primary sortas="b-telinit">telinit</primary>
291 </indexterm>
292 </listitem>
293 </varlistentry>
294
295 </variablelist>
296
297 </sect2>
298
299</sect1>
Note: See TracBrowser for help on using the repository browser.