sysvinit.xml 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  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" revision="sysv">
  8. <?dbhtml filename="sysvinit.html"?>
  9. <sect1info condition="script">
  10. <productname>sysvinit</productname>
  11. <productnumber>&sysvinit-version;</productnumber>
  12. <address>&sysvinit-url;</address>
  13. </sect1info>
  14. <title>Sysvinit-&sysvinit-version;</title>
  15. <indexterm zone="ch-system-sysvinit">
  16. <primary sortas="a-Sysvinit">Sysvinit</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The Sysvinit package contains programs for controlling the startup,
  21. running, and shutdown of the system.</para>
  22. <segmentedlist>
  23. <segtitle>&buildtime;</segtitle>
  24. <segtitle>&diskspace;</segtitle>
  25. <seglistitem>
  26. <seg>&sysvinit-fin-sbu;</seg>
  27. <seg>&sysvinit-fin-du;</seg>
  28. </seglistitem>
  29. </segmentedlist>
  30. </sect2>
  31. <sect2 role="installation">
  32. <title>Installation of Sysvinit</title>
  33. <!--
  34. <para>When run-levels are changed (for example, when halting the
  35. system), <command>init</command> sends termination signals to those
  36. processes that <command>init</command> itself started and that should
  37. not be running in the new run-level. While doing this,
  38. <command>init</command> outputs messages like <quote>Sending processes
  39. the TERM signal</quote> which seem to imply that it is sending these
  40. signals to all currently running processes. To avoid this
  41. misinterpretation, modify the source so that these messages read like
  42. <quote>Sending processes configured via /etc/inittab the TERM signal</quote>
  43. instead:</para>
  44. <screen><userinput remap="pre">sed -i 's@Sending processes@&amp; configured via /etc/inittab@g' src/init.c</userinput></screen>
  45. <para>Maintained versions of the <command>wall</command>,
  46. <command>mountpoint</command>, <command>last</command>,
  47. <command>mesg</command>, <command>sulogin</command>, and
  48. <command>utmpdump</command> programs were installed earlier by Util-linux.
  49. Suppress the installation of Sysvinit's versions of these programs and
  50. their man pages:</para>
  51. <screen><userinput remap="make">sed -ri -e '/utmpdump/d' \
  52. -e '/mountpoint/d' \
  53. -e '/mesg/d' \
  54. -e 's/= sulogin(\.8)?/=/' src/Makefile</userinput></screen>
  55. -->
  56. <para>First, apply a patch that removes several programs installed by other
  57. packages, clarifies a message, and fixes a compiler warning:</para>
  58. <screen><userinput remap="pre">patch -Np1 -i ../&sysvinit-consolidated-patch;</userinput></screen>
  59. <para>Compile the package:</para>
  60. <screen><userinput remap="make">make</userinput></screen>
  61. <para>This package does not come with a test suite.</para>
  62. <para>Install the package:</para>
  63. <screen><userinput remap="install">make install</userinput></screen>
  64. </sect2>
  65. <sect2 id="contents-sysvinit" role="content">
  66. <title>Contents of Sysvinit</title>
  67. <segmentedlist>
  68. <segtitle>Installed programs</segtitle>
  69. <seglistitem>
  70. <seg>bootlogd, fstab-decode, halt, init, killall5,
  71. poweroff (link to halt), reboot (link to halt), runlevel,
  72. shutdown, and telinit (link to init)</seg>
  73. </seglistitem>
  74. </segmentedlist>
  75. <variablelist>
  76. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  77. <?dbfo list-presentation="list"?>
  78. <?dbhtml list-presentation="table"?>
  79. <varlistentry id="bootlogd">
  80. <term><command>bootlogd</command></term>
  81. <listitem>
  82. <para>Logs boot messages to a log file</para>
  83. <indexterm zone="ch-system-sysvinit bootlogd">
  84. <primary sortas="b-bootlogd">bootlogd</primary>
  85. </indexterm>
  86. </listitem>
  87. </varlistentry>
  88. <varlistentry id="fstab-decode">
  89. <term><command>fstab-decode</command></term>
  90. <listitem>
  91. <para>Run a command with fstab-encoded arguments</para>
  92. <indexterm zone="ch-system-sysvinit fstab-decode">
  93. <primary sortas="b-fstab-decode">fstab-decode</primary>
  94. </indexterm>
  95. </listitem>
  96. </varlistentry>
  97. <varlistentry id="halt-sysv">
  98. <term><command>halt</command></term>
  99. <listitem>
  100. <para>Normally invokes <command>shutdown</command> with the
  101. <parameter>-h</parameter> option, except when already in run-level 0,
  102. then it tells the kernel to halt the system; it notes in the
  103. file <filename>/var/log/wtmp</filename> that the system is being
  104. brought down</para>
  105. <indexterm zone="ch-system-sysvinit halt-sysv">
  106. <primary sortas="b-halt">halt</primary>
  107. </indexterm>
  108. </listitem>
  109. </varlistentry>
  110. <varlistentry id="init-sysv">
  111. <term><command>init</command></term>
  112. <listitem>
  113. <para>The first process to be started when the kernel has initialized
  114. the hardware which takes over the boot process and starts all the
  115. proceses specified in its configuration file</para>
  116. <indexterm zone="ch-system-sysvinit init-sysv">
  117. <primary sortas="b-init">init</primary>
  118. </indexterm>
  119. </listitem>
  120. </varlistentry>
  121. <varlistentry id="killall5">
  122. <term><command>killall5</command></term>
  123. <listitem>
  124. <para>Sends a signal to all processes, except the processes in its own
  125. session so it will not kill its parent shell</para>
  126. <indexterm zone="ch-system-sysvinit killall5">
  127. <primary sortas="b-killall5">killall5</primary>
  128. </indexterm>
  129. </listitem>
  130. </varlistentry>
  131. <varlistentry id="poweroff-sysv">
  132. <term><command>poweroff</command></term>
  133. <listitem>
  134. <para>Tells the kernel to halt the system and switch off the computer
  135. (see <command>halt</command>)</para>
  136. <indexterm zone="ch-system-sysvinit poweroff-sysv">
  137. <primary sortas="b-poweroff">poweroff</primary>
  138. </indexterm>
  139. </listitem>
  140. </varlistentry>
  141. <varlistentry id="reboot-sysv">
  142. <term><command>reboot</command></term>
  143. <listitem>
  144. <para>Tells the kernel to reboot the system (see
  145. <command>halt</command>)</para>
  146. <indexterm zone="ch-system-sysvinit reboot-sysv">
  147. <primary sortas="b-reboot">reboot</primary>
  148. </indexterm>
  149. </listitem>
  150. </varlistentry>
  151. <varlistentry id="runlevel-sysv">
  152. <term><command>runlevel</command></term>
  153. <listitem>
  154. <para>Reports the previous and the current run-level, as noted in the
  155. last run-level record in <filename>/run/utmp</filename></para>
  156. <indexterm zone="ch-system-sysvinit runlevel-sysv">
  157. <primary sortas="b-runlevel">runlevel</primary>
  158. </indexterm>
  159. </listitem>
  160. </varlistentry>
  161. <varlistentry id="shutdown-sysv">
  162. <term><command>shutdown</command></term>
  163. <listitem>
  164. <para>Brings the system down in a secure way, signaling all processes
  165. and notifying all logged-in users</para>
  166. <indexterm zone="ch-system-sysvinit shutdown-sysv">
  167. <primary sortas="b-shutdown">shutdown</primary>
  168. </indexterm>
  169. </listitem>
  170. </varlistentry>
  171. <varlistentry id="telinit-sysv">
  172. <term><command>telinit</command></term>
  173. <listitem>
  174. <para>Tells <command>init</command> which run-level to change to</para>
  175. <indexterm zone="ch-system-sysvinit telinit-sysv">
  176. <primary sortas="b-telinit">telinit</primary>
  177. </indexterm>
  178. </listitem>
  179. </varlistentry>
  180. </variablelist>
  181. </sect2>
  182. </sect1>