sysvinit.xml 9.8 KB

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