1
0

sysvinit.xml 7.8 KB

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