[7152faa] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[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 |
|
---|
[35a5259] | 8 | <sect1 id="ch-system-sysvinit" role="wrap" revision="sysv">
|
---|
[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 |
|
---|
[8aa80e4] | 17 | <title>SysVinit-&sysvinit-version;</title>
|
---|
[ddd5542] | 18 |
|
---|
| 19 | <indexterm zone="ch-system-sysvinit">
|
---|
[8aa80e4] | 20 | <primary sortas="a-SysVinit">SysVinit</primary>
|
---|
[ddd5542] | 21 | </indexterm>
|
---|
| 22 |
|
---|
| 23 | <sect2 role="package">
|
---|
| 24 | <title/>
|
---|
| 25 |
|
---|
[8aa80e4] | 26 | <para>The SysVinit package contains programs for controlling the startup,
|
---|
[ddd5542] | 27 | running, and shutdown of the system.</para>
|
---|
| 28 |
|
---|
| 29 | <segmentedlist>
|
---|
| 30 | <segtitle>&buildtime;</segtitle>
|
---|
| 31 | <segtitle>&diskspace;</segtitle>
|
---|
| 32 |
|
---|
| 33 | <seglistitem>
|
---|
[fb386e0] | 34 | <seg>&sysvinit-fin-sbu;</seg>
|
---|
| 35 | <seg>&sysvinit-fin-du;</seg>
|
---|
[ddd5542] | 36 | </seglistitem>
|
---|
| 37 | </segmentedlist>
|
---|
| 38 |
|
---|
| 39 | </sect2>
|
---|
| 40 |
|
---|
| 41 | <sect2 role="installation">
|
---|
[8aa80e4] | 42 | <title>Installation of SysVinit</title>
|
---|
[ddd5542] | 43 |
|
---|
[9132fe4] | 44 | <!--
|
---|
[ddd5542] | 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
|
---|
[12a2975c] | 53 | <quote>Sending processes configured via /etc/inittab the TERM signal</quote>
|
---|
[ddd5542] | 54 | instead:</para>
|
---|
[73aedd1d] | 55 |
|
---|
[9f5aaf7] | 56 | <screen><userinput remap="pre">sed -i 's@Sending processes@& configured via /etc/inittab@g' src/init.c</userinput></screen>
|
---|
[73aedd1d] | 57 |
|
---|
[4322222] | 58 | <para>Maintained versions of the <command>wall</command>,
|
---|
[3c7ea1f] | 59 | <command>mountpoint</command>, <command>last</command>,
|
---|
[4783efe] | 60 | <command>mesg</command>, <command>sulogin</command>, and
|
---|
| 61 | <command>utmpdump</command> programs were installed earlier by Util-linux.
|
---|
[8aa80e4] | 62 | Suppress the installation of SysVinit's versions of these programs and
|
---|
[4783efe] | 63 | their man pages:</para>
|
---|
[e38671e] | 64 |
|
---|
[4783efe] | 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>
|
---|
[9132fe4] | 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>
|
---|
[e38671e] | 74 |
|
---|
[ddd5542] | 75 | <para>Compile the package:</para>
|
---|
[73aedd1d] | 76 |
|
---|
[54739fef] | 77 | <screen><userinput remap="make">make</userinput></screen>
|
---|
[73aedd1d] | 78 |
|
---|
[ddd5542] | 79 | <para>This package does not come with a test suite.</para>
|
---|
[0be3d41] | 80 |
|
---|
[ddd5542] | 81 | <para>Install the package:</para>
|
---|
[73aedd1d] | 82 |
|
---|
[54739fef] | 83 | <screen><userinput remap="install">make install</userinput></screen>
|
---|
[73aedd1d] | 84 |
|
---|
[ddd5542] | 85 | </sect2>
|
---|
[5888299] | 86 |
|
---|
[ddd5542] | 87 | <sect2 id="contents-sysvinit" role="content">
|
---|
[8aa80e4] | 88 | <title>Contents of SysVinit</title>
|
---|
[ddd5542] | 89 |
|
---|
| 90 | <segmentedlist>
|
---|
| 91 | <segtitle>Installed programs</segtitle>
|
---|
| 92 |
|
---|
| 93 | <seglistitem>
|
---|
[d672ab7] | 94 | <seg>bootlogd, fstab-decode, halt, init, killall5,
|
---|
[9132fe4] | 95 | poweroff (link to halt), reboot (link to halt), runlevel,
|
---|
[4783efe] | 96 | shutdown, and telinit (link to init)</seg>
|
---|
[ddd5542] | 97 | </seglistitem>
|
---|
| 98 | </segmentedlist>
|
---|
| 99 |
|
---|
| 100 | <variablelist>
|
---|
| 101 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 102 | <?dbfo list-presentation="list"?>
|
---|
| 103 | <?dbhtml list-presentation="table"?>
|
---|
| 104 |
|
---|
[8bc46a5] | 105 | <varlistentry id="bootlogd">
|
---|
| 106 | <term><command>bootlogd</command></term>
|
---|
| 107 | <listitem>
|
---|
| 108 | <para>Logs boot messages to a log file</para>
|
---|
| 109 | <indexterm zone="ch-system-sysvinit bootlogd">
|
---|
| 110 | <primary sortas="b-bootlogd">bootlogd</primary>
|
---|
| 111 | </indexterm>
|
---|
| 112 | </listitem>
|
---|
| 113 | </varlistentry>
|
---|
| 114 |
|
---|
[b188c43] | 115 | <varlistentry id="fstab-decode">
|
---|
| 116 | <term><command>fstab-decode</command></term>
|
---|
| 117 | <listitem>
|
---|
[d15c80e] | 118 | <para>Runs a command with fstab-encoded arguments</para>
|
---|
[b188c43] | 119 | <indexterm zone="ch-system-sysvinit fstab-decode">
|
---|
| 120 | <primary sortas="b-fstab-decode">fstab-decode</primary>
|
---|
| 121 | </indexterm>
|
---|
| 122 | </listitem>
|
---|
| 123 | </varlistentry>
|
---|
| 124 |
|
---|
[cba2d4e] | 125 | <varlistentry id="halt-sysv">
|
---|
[ddd5542] | 126 | <term><command>halt</command></term>
|
---|
| 127 | <listitem>
|
---|
| 128 | <para>Normally invokes <command>shutdown</command> with the
|
---|
[d15c80e] | 129 | <parameter>-h</parameter> option, but when already in run-level 0,
|
---|
| 130 | it tells the kernel to halt the system; it notes in the
|
---|
| 131 | file <filename>/var/log/wtmp</filename> that the system is
|
---|
| 132 | going down</para>
|
---|
[cba2d4e] | 133 | <indexterm zone="ch-system-sysvinit halt-sysv">
|
---|
[ddd5542] | 134 | <primary sortas="b-halt">halt</primary>
|
---|
| 135 | </indexterm>
|
---|
| 136 | </listitem>
|
---|
| 137 | </varlistentry>
|
---|
| 138 |
|
---|
[cba2d4e] | 139 | <varlistentry id="init-sysv">
|
---|
[ddd5542] | 140 | <term><command>init</command></term>
|
---|
| 141 | <listitem>
|
---|
| 142 | <para>The first process to be started when the kernel has initialized
|
---|
[d15c80e] | 143 | the hardware; it takes over the boot process and starts all the
|
---|
| 144 | processes specified in its configuration file</para>
|
---|
[cba2d4e] | 145 | <indexterm zone="ch-system-sysvinit init-sysv">
|
---|
[ddd5542] | 146 | <primary sortas="b-init">init</primary>
|
---|
| 147 | </indexterm>
|
---|
| 148 | </listitem>
|
---|
| 149 | </varlistentry>
|
---|
| 150 |
|
---|
| 151 | <varlistentry id="killall5">
|
---|
| 152 | <term><command>killall5</command></term>
|
---|
| 153 | <listitem>
|
---|
| 154 | <para>Sends a signal to all processes, except the processes in its own
|
---|
[d15c80e] | 155 | session; it will not kill its parent shell</para>
|
---|
[ddd5542] | 156 | <indexterm zone="ch-system-sysvinit killall5">
|
---|
| 157 | <primary sortas="b-killall5">killall5</primary>
|
---|
| 158 | </indexterm>
|
---|
| 159 | </listitem>
|
---|
| 160 | </varlistentry>
|
---|
| 161 |
|
---|
[cba2d4e] | 162 | <varlistentry id="poweroff-sysv">
|
---|
[ddd5542] | 163 | <term><command>poweroff</command></term>
|
---|
| 164 | <listitem>
|
---|
| 165 | <para>Tells the kernel to halt the system and switch off the computer
|
---|
| 166 | (see <command>halt</command>)</para>
|
---|
[cba2d4e] | 167 | <indexterm zone="ch-system-sysvinit poweroff-sysv">
|
---|
[ddd5542] | 168 | <primary sortas="b-poweroff">poweroff</primary>
|
---|
| 169 | </indexterm>
|
---|
| 170 | </listitem>
|
---|
| 171 | </varlistentry>
|
---|
| 172 |
|
---|
[cba2d4e] | 173 | <varlistentry id="reboot-sysv">
|
---|
[ddd5542] | 174 | <term><command>reboot</command></term>
|
---|
| 175 | <listitem>
|
---|
| 176 | <para>Tells the kernel to reboot the system (see
|
---|
| 177 | <command>halt</command>)</para>
|
---|
[cba2d4e] | 178 | <indexterm zone="ch-system-sysvinit reboot-sysv">
|
---|
[ddd5542] | 179 | <primary sortas="b-reboot">reboot</primary>
|
---|
| 180 | </indexterm>
|
---|
| 181 | </listitem>
|
---|
| 182 | </varlistentry>
|
---|
| 183 |
|
---|
[cba2d4e] | 184 | <varlistentry id="runlevel-sysv">
|
---|
[ddd5542] | 185 | <term><command>runlevel</command></term>
|
---|
| 186 | <listitem>
|
---|
| 187 | <para>Reports the previous and the current run-level, as noted in the
|
---|
[02776dff] | 188 | last run-level record in <filename>/run/utmp</filename></para>
|
---|
[cba2d4e] | 189 | <indexterm zone="ch-system-sysvinit runlevel-sysv">
|
---|
[ddd5542] | 190 | <primary sortas="b-runlevel">runlevel</primary>
|
---|
| 191 | </indexterm>
|
---|
| 192 | </listitem>
|
---|
| 193 | </varlistentry>
|
---|
| 194 |
|
---|
[cba2d4e] | 195 | <varlistentry id="shutdown-sysv">
|
---|
[ddd5542] | 196 | <term><command>shutdown</command></term>
|
---|
| 197 | <listitem>
|
---|
| 198 | <para>Brings the system down in a secure way, signaling all processes
|
---|
| 199 | and notifying all logged-in users</para>
|
---|
[cba2d4e] | 200 | <indexterm zone="ch-system-sysvinit shutdown-sysv">
|
---|
[ddd5542] | 201 | <primary sortas="b-shutdown">shutdown</primary>
|
---|
| 202 | </indexterm>
|
---|
| 203 | </listitem>
|
---|
| 204 | </varlistentry>
|
---|
| 205 |
|
---|
[cba2d4e] | 206 | <varlistentry id="telinit-sysv">
|
---|
[ddd5542] | 207 | <term><command>telinit</command></term>
|
---|
| 208 | <listitem>
|
---|
| 209 | <para>Tells <command>init</command> which run-level to change to</para>
|
---|
[cba2d4e] | 210 | <indexterm zone="ch-system-sysvinit telinit-sysv">
|
---|
[ddd5542] | 211 | <primary sortas="b-telinit">telinit</primary>
|
---|
| 212 | </indexterm>
|
---|
| 213 | </listitem>
|
---|
| 214 | </varlistentry>
|
---|
| 215 |
|
---|
| 216 | </variablelist>
|
---|
| 217 |
|
---|
| 218 | </sect2>
|
---|
[81fd230] | 219 |
|
---|
[ddd5542] | 220 | </sect1>
|
---|