Ignore:
Timestamp:
05/03/2004 10:59:46 AM (20 years ago)
Author:
Matthew Burgess <matthew@…>
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.0, 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, v5_1, v5_1_1, 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:
0c43171, 2ec64b3, a4a675f
Parents:
287ea55
Message:
  • Merged newxml into HEAD

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter06/sysvinit.xml

    r287ea55 r673b0d8  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
    16<sect1 id="ch-system-sysvinit" xreflabel="Sysvinit">
    2 <title>Installing Sysvinit-&sysvinit-version;</title>
    3 <?dbhtml filename="sysvinit.html" dir="chapter06"?>
     7<title>Sysvinit-&sysvinit-version;</title>
     8<?dbhtml filename="sysvinit.html"?>
     9
     10<indexterm zone="ch-system-sysvinit"><primary sortas="a-Sysvinit">Sysvinit</primary></indexterm>
    411
    512<para>The Sysvinit package contains programs for controlling the startup,
    613running, and shutdown of your system.</para>
    714
    8 <screen>&buildtime; &sysvinit-time;
    9 &diskspace; &sysvinit-compsize;</screen>
     15<screen>&buildtime; 0.1 SBU
     16&diskspace; 0.9 MB</screen>
    1017
    11 &aa-sysvinit-down;
    12 &aa-sysvinit-dep;
     18<para>Sysvinit installation depends on: Binutils, Coreutils, GCC, Glibc, Make.</para>
    1319
    14 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
     20
    1521
    1622<sect2>
    1723<title>Installation of Sysvinit</title>
    1824
    19 <para>When runlevels are changed (for example, when halting the system),
    20 <command>init</command> sends termination signals to those processes that it
    21 itself started and that shouldn't be running in the new runlevel. While doing
    22 this, <command>init</command> outputs messages like "Sending processes the TERM
    23 signal" which seem to imply that it is sending these signals to all currently
    24 running processes. To avoid this misinterpretation, you can modify the source
    25 so that these messages read like "Sending processes started by init the TERM
    26 signal" instead:</para>
     25<para>When run-levels are changed (for example, when halting the system),
     26<command>init</command> sends termination signals to those processes that
     27<command>init</command> itself started and that shouldn't be running in the new
     28run-level. While doing this, <command>init</command> outputs messages like
     29<quote>Sending processes the TERM signal</quote> which seem to imply that it is sending these signals to all currently running processes. To avoid this
     30misinterpretation, you can modify the source so that these messages read like
     31<quote>Sending processes started by init the TERM signal</quote> instead:</para>
    2732
    2833<screen><userinput>cp src/init.c{,.backup}
    2934sed 's/Sending processes/&amp; started by init/g' \
    30 &nbsp;&nbsp;&nbsp;&nbsp;src/init.c.backup &gt; src/init.c</userinput></screen>
     35    src/init.c.backup &gt; src/init.c</userinput></screen>
    3136
    3237<para>Compile Sysvinit:</para>
     
    3439<screen><userinput>make -C src</userinput></screen>
    3540
    36 <para>And install it:</para>
     41<para>Then install it:</para>
    3742
    3843<screen><userinput>make -C src install</userinput></screen>
     
    4045</sect2>
    4146
    42 <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
    4347
    44 <sect2><title>Configuring Sysvinit</title>
     48<sect2 id="conf-sysvinit"><title>Configuring Sysvinit</title>
     49<indexterm zone="conf-sysvinit">
     50<primary sortas="a-Sysvinit">Sysvinit</primary>
     51<secondary>configuring</secondary></indexterm>
     52
     53<indexterm zone="conf-sysvinit"><primary sortas="e-/etc/inittab">/etc/inittab</primary></indexterm>
    4554
    4655<para>Create a new <filename>/etc/inittab</filename> file by running the
     
    7887</sect2>
    7988
    80 &aa-sysvinit-shortdesc;
    81 &aa-sysvinit-desc;
     89
     90<sect2 id="contents-sysvinit"><title>Contents of Sysvinit</title>
     91
     92<para><emphasis>Installed programs</emphasis>: halt, init, killall5, last,
     93lastb (link to last), mesg, pidof (link to killall5), poweroff (link to halt),
     94reboot (link to halt), runlevel, shutdown, sulogin, telinit (link to init),
     95utmpdump and wall</para>
     96
     97</sect2>
     98
     99
     100<sect2><title>Short descriptions</title>
     101
     102<indexterm zone="ch-system-sysvinit halt"><primary sortas="b-halt">halt</primary></indexterm>
     103<para id="halt"><command>halt</command> normally invokes shutdown with the -h flag,
     104except when already in run-level 0, then it tells the kernel to halt the system.
     105But first it notes in the file <filename>/var/log/wtmp</filename> that the
     106system is being brought down.</para>
     107
     108<indexterm zone="ch-system-sysvinit init"><primary sortas="b-init">init</primary></indexterm>
     109<para id="init"><command>init</command> is the mother of all processes. It reads its
     110commands from <filename>/etc/inittab</filename>, which normally tell it which
     111scripts to run for which run-level, and how many gettys to spawn.</para>
     112
     113<indexterm zone="ch-system-sysvinit killall5"><primary sortas="b-killall5">killall5</primary></indexterm>
     114<para id="killall5"><command>killall5</command> sends a signal to all processes, except
     115the processes in its own session -- so it won't kill the shell running the
     116script that called it.</para>
     117
     118<indexterm zone="ch-system-sysvinit last"><primary sortas="b-last">last</primary></indexterm>
     119<para id="last"><command>last</command> shows which users last logged in (and out),
     120searching back through the file <filename>/var/log/wtmp</filename>. It can
     121also show system boots and shutdowns, and run-level changes.</para>
     122
     123<indexterm zone="ch-system-sysvinit lastb"><primary sortas="b-lastb">lastb</primary></indexterm>
     124<para id="lastb"><command>lastb</command> shows the failed login attempts, as logged
     125in <filename>/var/log/btmp</filename>.</para>
     126
     127<indexterm zone="ch-system-sysvinit mesg"><primary sortas="b-mesg">mesg</primary></indexterm>
     128<para id="mesg"><command>mesg</command> controls whether other users can send
     129messages to the current user's terminal.</para>
     130
     131<indexterm zone="ch-system-sysvinit pidof"><primary sortas="b-pidof">pidof</primary></indexterm>
     132<para id="pidof"><command>pidof</command> reports the PIDs of the given programs.</para>
     133
     134<indexterm zone="ch-system-sysvinit poweroff"><primary sortas="b-poweroff">poweroff</primary></indexterm>
     135<para id="poweroff"><command>poweroff</command> tells the kernel to halt the system and
     136switch off the computer. But see halt.</para>
     137
     138<indexterm zone="ch-system-sysvinit reboot"><primary sortas="b-reboot">reboot</primary></indexterm>
     139<para id="reboot"><command>reboot</command> tells the kernel to reboot the system.
     140But see halt.</para>
     141
     142<indexterm zone="ch-system-sysvinit runlevel"><primary sortas="b-runlevel">runlevel</primary></indexterm>
     143<para id="runlevel"><command>runlevel</command> reports the previous and the current
     144run-level, as noted in the last run-level record in
     145<filename>/var/run/utmp</filename>.</para>
     146
     147<indexterm zone="ch-system-sysvinit shutdown"><primary sortas="b-shutdown">shutdown</primary></indexterm>
     148<para id="shutdown"><command>shutdown</command> brings the system down in a secure way,
     149signaling all processes and notifying all logged-in users.</para>
     150
     151<indexterm zone="ch-system-sysvinit sulogin"><primary sortas="b-sulogin">sulogin</primary></indexterm>
     152<para id="sulogin"><command>sulogin</command> allows the superuser to log in. It is
     153normally invoked by init when the system goes into single user mode.</para>
     154
     155<indexterm zone="ch-system-sysvinit telinit"><primary sortas="b-telinit">telinit</primary></indexterm>
     156<para id="telinit"><command>telinit</command> tells init which run-level to enter.</para>
     157
     158<indexterm zone="ch-system-sysvinit utmpdump"><primary sortas="b-utmpdump">utmpdump</primary></indexterm>
     159<para id="utmpdump"><command>utmpdump</command> displays the content of the given login
     160file in a friendlier format.</para>
     161
     162<indexterm zone="ch-system-sysvinit wall"><primary sortas="b-wall">wall</primary></indexterm>
     163<para id="wall"><command>wall</command> writes a message to all logged-in users.</para>
     164
     165</sect2>
     166
     167
    82168
    83169</sect1>
    84 
Note: See TracChangeset for help on using the changeset viewer.