Ignore:
Timestamp:
02/19/2005 10:16:42 PM (19 years ago)
Author:
Gerard Beekmans <gerard@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
3d31fc4
Parents:
2f9131f
Message:

Trunk is now identical to Testing

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4648 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter06/sysvinit.xml

    r2f9131f r81fd230  
    44  %general-entities;
    55]>
    6 <sect1 id="ch-system-sysvinit" xreflabel="Sysvinit" role="wrap">
     6<sect1 id="ch-system-sysvinit" role="wrap">
    77<title>Sysvinit-&sysvinit-version;</title>
    88<?dbhtml filename="sysvinit.html"?>
     
    1111
    1212<sect2 role="package"><title/>
     13<para>The Sysvinit package contains programs for controlling the startup,
     14running, and shutdown of the system.</para>
    1315
    1416<segmentedlist>
     
    1820</segmentedlist>
    1921
     22<segmentedlist>
     23<segtitle>Sysvinit installation depends on</segtitle>
     24<seglistitem><seg>Binutils, Coreutils, GCC, Glibc, and Make</seg></seglistitem>
     25</segmentedlist>
    2026</sect2>
    2127
     
    2329<title>Installation of Sysvinit</title>
    2430
    25 <para>Issue a sed sustitution:</para>
     31<para>When run-levels are changed (for example, when halting the
     32system), <command>init</command> sends termination signals to those
     33processes that <command>init</command> itself started and that should
     34not be running in the new run-level.  While doing this,
     35<command>init</command> outputs messages like <quote>Sending processes
     36the TERM signal</quote> which seem to imply that it is sending these
     37signals to all currently running processes. To avoid this
     38misinterpretation, modify the source so that these messages read like
     39<quote>Sending processes started by init the TERM signal</quote>
     40instead:</para>
    2641
    2742<screen><userinput>sed -i 's@Sending processes@&amp; started by init@g' \
    2843    src/init.c</userinput></screen>
    2944
    30 <para>Compile Sysvinit:</para>
     45<para>Compile the package:</para>
    3146
    3247<screen><userinput>make -C src</userinput></screen>
    3348
    34 <para>Then install it:</para>
     49<para>Install the package:</para>
    3550
    3651<screen><userinput>make -C src install</userinput></screen>
     
    4055
    4156<sect2 id="conf-sysvinit" role="configuration"><title>Configuring Sysvinit</title>
    42 
    43 <para>Create a <filename>/etc/inittab</filename> file:</para>
     57<indexterm zone="conf-sysvinit">
     58<primary sortas="a-Sysvinit">Sysvinit</primary>
     59<secondary>configuring</secondary></indexterm>
     60
     61<indexterm zone="conf-sysvinit"><primary sortas="e-/etc/inittab">/etc/inittab</primary></indexterm>
     62
     63<para>Create a new file <filename>/etc/inittab</filename> by running the
     64following:</para>
    4465
    4566<screen><userinput>cat &gt; /etc/inittab &lt;&lt; "EOF"
     
    7293EOF</userinput></screen>
    7394
     95<para>The <parameter>-I '\033(K'</parameter> option tells
     96<command>agetty</command> to send this escape sequence to the terminal
     97before doing anything else. This escape sequence switches the console
     98character set to a user-defined one, which can be modified by running
     99the <command>setfont</command> program. The <command>console</command>
     100initscript from the LFS-Bootscripts package calls the <command>setfont</command>
     101program during system startup. Sending this escape sequence is
     102necessary for people who use non-ISO 8859-1 screen fonts, but it does
     103not effect native English speakers.</para>
     104
    74105</sect2>
    75106
     
    77108<sect2 id="contents-sysvinit" role="content"><title>Contents of Sysvinit</title>
    78109
    79 <para>See testing</para>
    80 
    81 <!-- This should be added to testing:
     110<segmentedlist>
     111<segtitle>Installed programs</segtitle>
     112<seglistitem><seg>halt, init, killall5, last, lastb (link to last), mesg, pidof (link to
     113killall5), poweroff (link to halt), reboot (link to halt), runlevel, shutdown, sulogin, telinit
     114(link to init), utmpdump, and wall</seg></seglistitem>
     115</segmentedlist>
     116
     117<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
     118<?dbfo list-presentation="list"?>
     119
     120<varlistentry id="halt">
     121<term><command>halt</command></term>
     122<listitem>
     123<para>Normally invokes <command>shutdown</command> with the
     124<parameter>-h</parameter> option, except when already in run-level 0,
     125then it tells the kernel to halt the system; it notes in the
     126file <filename>/var/log/wtmp</filename> that the system is being
     127brought down</para>
     128<indexterm zone="ch-system-sysvinit halt"><primary sortas="b-halt">halt</primary></indexterm>
     129</listitem>
     130</varlistentry>
     131
     132<varlistentry id="init">
     133<term><command>init</command></term>
     134<listitem>
     135<para>The first process to be started when the kernel has initialized
     136the hardware which takes over the boot process and
     137starts all the proceses it is instructed to</para>
     138<indexterm zone="ch-system-sysvinit init"><primary sortas="b-init">init</primary></indexterm>
     139</listitem>
     140</varlistentry>
     141
     142<varlistentry id="killall5">
     143<term><command>killall5</command></term>
     144<listitem>
     145<para>Sends a signal to all processes, except the processes in its own
     146session so it will not kill the shell running the script that called
     147it</para>
     148<indexterm zone="ch-system-sysvinit killall5"><primary sortas="b-killall5">killall5</primary></indexterm>
     149</listitem>
     150</varlistentry>
     151
     152<varlistentry id="last">
     153<term><command>last</command></term>
     154<listitem>
     155<para>Shows which users last logged in (and out),
     156searching back through the <filename>/var/log/wtmp</filename> file; it
     157also shows system boots, shutdowns, and run-level changes</para>
     158<indexterm zone="ch-system-sysvinit last"><primary sortas="b-last">last</primary></indexterm>
     159</listitem>
     160</varlistentry>
     161
     162<varlistentry id="lastb">
     163<term><command>lastb</command></term>
     164<listitem>
     165<para>Shows the failed login attempts, as logged in
     166<filename>/var/log/btmp</filename></para>
     167<indexterm zone="ch-system-sysvinit lastb"><primary sortas="b-lastb">lastb</primary></indexterm>
     168</listitem>
     169</varlistentry>
     170
     171<varlistentry id="mesg">
     172<term><command>mesg</command></term>
     173<listitem>
     174<para>Controls whether other users can send messages to the current
     175user's terminal</para>
     176<indexterm zone="ch-system-sysvinit mesg"><primary sortas="b-mesg">mesg</primary></indexterm>
     177</listitem>
     178</varlistentry>
    82179
    83180<varlistentry id="mountpoint">
     
    89186</varlistentry>
    90187
    91 -->
     188<varlistentry id="pidof">
     189<term><command>pidof</command></term>
     190<listitem>
     191<para>Reports the PIDs of the given programs</para>
     192<indexterm zone="ch-system-sysvinit pidof"><primary sortas="b-pidof">pidof</primary></indexterm>
     193</listitem>
     194</varlistentry>
     195
     196<varlistentry id="poweroff">
     197<term><command>poweroff</command></term>
     198<listitem>
     199<para>Tells the kernel to halt the system and switch off the computer
     200(see <command>halt</command>)</para>
     201<indexterm zone="ch-system-sysvinit poweroff"><primary sortas="b-poweroff">poweroff</primary></indexterm>
     202</listitem>
     203</varlistentry>
     204
     205<varlistentry id="reboot">
     206<term><command>reboot</command></term>
     207<listitem>
     208<para>Tells the kernel to reboot the system (see
     209<command>halt</command>)</para>
     210<indexterm zone="ch-system-sysvinit reboot"><primary sortas="b-reboot">reboot</primary></indexterm>
     211</listitem>
     212</varlistentry>
     213
     214<varlistentry id="runlevel">
     215<term><command>runlevel</command></term>
     216<listitem>
     217<para>Reports the previous and the current run-level, as noted in the last run-level
     218record in <filename>/var/run/utmp</filename></para>
     219<indexterm zone="ch-system-sysvinit runlevel"><primary sortas="b-runlevel">runlevel</primary></indexterm>
     220</listitem>
     221</varlistentry>
     222
     223<varlistentry id="shutdown">
     224<term><command>shutdown</command></term>
     225<listitem>
     226<para>Brings the system down in a secure way, signaling all processes
     227and notifying all logged-in users</para>
     228<indexterm zone="ch-system-sysvinit shutdown"><primary sortas="b-shutdown">shutdown</primary></indexterm>
     229</listitem>
     230</varlistentry>
     231
     232<varlistentry id="sulogin">
     233<term><command>sulogin</command></term>
     234<listitem>
     235<para>Allows <emphasis>root</emphasis> to log in; it is
     236normally invoked by <command>init</command> when the system goes into single user mode</para>
     237<indexterm zone="ch-system-sysvinit sulogin"><primary sortas="b-sulogin">sulogin</primary></indexterm>
     238</listitem>
     239</varlistentry>
     240
     241<varlistentry id="telinit">
     242<term><command>telinit</command></term>
     243<listitem>
     244<para>Tells <command>init</command> which run-level to change to</para>
     245<indexterm zone="ch-system-sysvinit telinit"><primary sortas="b-telinit">telinit</primary></indexterm>
     246</listitem>
     247</varlistentry>
     248
     249<varlistentry id="utmpdump">
     250<term><command>utmpdump</command></term>
     251<listitem>
     252<para>Displays the content of the given login file in a more
     253user-friendly format</para>
     254<indexterm zone="ch-system-sysvinit utmpdump"><primary sortas="b-utmpdump">utmpdump</primary></indexterm>
     255</listitem>
     256</varlistentry>
     257
     258<varlistentry id="wall">
     259<term><command>wall</command></term>
     260<listitem>
     261<para>Writes a message to all logged-in users</para>
     262<indexterm zone="ch-system-sysvinit wall"><primary sortas="b-wall">wall</primary></indexterm>
     263</listitem>
     264</varlistentry>
     265</variablelist>
    92266
    93267</sect2>
    94268
    95269</sect1>
     270
Note: See TracChangeset for help on using the changeset viewer.