mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-03-05 22:04:48 +00:00
Tags corrections
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3813 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
8ad79807a3
commit
f67f5cfed5
@ -63,8 +63,8 @@ and network based file systems).</para>
|
||||
<listitem>
|
||||
<indexterm zone="ch-scripts-bootscripts cleanfs-bootscripts"><primary sortas="d-cleanfs">cleanfs</primary></indexterm>
|
||||
<para>removes files that shouldn't be
|
||||
preserved between reboots, such as those in <filename>/var/run/</filename> and
|
||||
<filename>/var/lock/</filename>. It re-creates <filename>/var/run/utmp</filename>
|
||||
preserved between reboots, such as those in <filename class="directory">/var/run/</filename> and
|
||||
<filename class="directory">/var/lock/</filename>. It re-creates <filename>/var/run/utmp</filename>
|
||||
and removes the possibly present <filename>/etc/nologin</filename>,
|
||||
<filename>/fastboot</filename> and <filename>/forcefsck</filename> files.</para>
|
||||
</listitem>
|
||||
@ -125,7 +125,7 @@ aren't marked <emphasis>noauto</emphasis> or aren't network based.</para>
|
||||
<term><command>mountkernfs</command></term>
|
||||
<listitem>
|
||||
<indexterm zone="ch-scripts-bootscripts mountkernfs-bootscripts"><primary sortas="d-mountkernfs">mountkernfs</primary></indexterm>
|
||||
<para>is used to mount kernel-provided file systems, such as /proc.</para>
|
||||
<para>is used to mount kernel-provided file systems, such as <systemitem class="filesystem">proc</systemitem>.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
@ -38,23 +38,24 @@ arguments for these programs.
|
||||
Once you decided, create the
|
||||
configuration file with the following command:</para>
|
||||
|
||||
<screen><userinput>cat >/etc/sysconfig/console <<"EOF"</userinput>
|
||||
KEYMAP="<emphasis>arguments for loadkeys</emphasis>"
|
||||
FONT="<emphasis>arguments for setfont</emphasis>"
|
||||
<userinput>EOF</userinput></screen>
|
||||
<screen><userinput>cat >/etc/sysconfig/console <<"EOF"
|
||||
KEYMAP="<replaceable>[arguments for loadkeys]</replaceable>"
|
||||
FONT="<replaceable>[arguments for setfont]</replaceable>"
|
||||
EOF</userinput></screen>
|
||||
|
||||
<para>E.g., for Spanish users who also want to use the Euro character
|
||||
(accessible by pressing Alt+E),
|
||||
the following settings are correct:</para>
|
||||
|
||||
<screen><userinput>cat >/etc/sysconfig/console <<"EOF"</userinput>
|
||||
<screen><userinput>cat >/etc/sysconfig/console <<"EOF"
|
||||
KEYMAP="es euro"
|
||||
FONT="lat9-16 -u iso01"
|
||||
<userinput>EOF</userinput></screen>
|
||||
EOF</userinput></screen>
|
||||
|
||||
<note><para>The FONT line above is correct only for the ISO-8859-15
|
||||
character set. If you prefer ISO-8859-1 and therefore use a pound sign
|
||||
instead of Euro, the correct FONT line is:</para>
|
||||
|
||||
<screen><userinput>FONT="lat1-16"</userinput></screen></note>
|
||||
|
||||
<para>If the KEYMAP or FONT variable is not set, the
|
||||
@ -63,17 +64,17 @@ program.</para>
|
||||
|
||||
<para>In some keymaps, the Backspace and Delete keys send characters
|
||||
different form ones in the default keymap built into the kernel.
|
||||
This confuses some applications, e.g. <application>Emacs</application>
|
||||
This confuses some applications, e.g., <application>Emacs</application>
|
||||
displays its help (instead of erasing the character before the cursor)
|
||||
when you press Backspace. To check if your keymap is affected (this works
|
||||
only for i386 keymaps):</para>
|
||||
|
||||
<screen><userinput>zgrep '\W14\W' /path/to/your/keymap</userinput></screen>
|
||||
<screen><userinput>zgrep '\W14\W' <replaceable>[/path/to/your/keymap]</replaceable></userinput></screen>
|
||||
|
||||
<para>If you see that keycode 14 is Backspace and not Delete,
|
||||
create the following keymap snippet to fix this issue:</para>
|
||||
|
||||
<screen><userinput>mkdir -p /etc/kbd & & cat >/etc/kbd/bs-sends-del <<"EOF"</userinput>
|
||||
<screen><userinput>mkdir -p /etc/kbd & & cat >/etc/kbd/bs-sends-del <<"EOF"
|
||||
keycode 14 = Delete Delete Delete Delete
|
||||
alt keycode 14 = Meta_Delete
|
||||
altgr alt keycode 14 = Meta_Delete
|
||||
@ -81,14 +82,14 @@ altgr alt keycode 14 = Meta_Delete
|
||||
altgr control keycode 111 = Boot
|
||||
control alt keycode 111 = Boot
|
||||
altgr control alt keycode 111 = Boot
|
||||
<userinput>EOF</userinput></screen>
|
||||
EOF</userinput></screen>
|
||||
|
||||
<para>Then tell the <command>console</command> script to load this snippet
|
||||
after the main keymap:</para>
|
||||
|
||||
<screen><userinput>cat >>/etc/sysconfig/console <<"EOF"</userinput>
|
||||
<screen><userinput>cat >>/etc/sysconfig/console <<"EOF"
|
||||
KEYMAP_CORRECTION="/etc/kbd/bs-sends-del"
|
||||
<userinput>EOF</userinput></screen>
|
||||
EOF</userinput></screen>
|
||||
|
||||
<para>If you decided to
|
||||
compile your keymap directly into the kernel later on in <xref
|
||||
|
@ -12,14 +12,14 @@
|
||||
<secondary>configuring</secondary></indexterm>
|
||||
|
||||
<para>Part of the localnet script is setting up the system's hostname. This
|
||||
needs to be configured in the /etc/sysconfig/network.</para>
|
||||
needs to be configured in the <filename>/etc/sysconfig/network</filename>.</para>
|
||||
|
||||
<para>Create the /etc/sysconfig/network file and enter a hostname by
|
||||
<para>Create the <filename>/etc/sysconfig/network</filename> file and enter a hostname by
|
||||
running:</para>
|
||||
|
||||
<screen><userinput>echo "HOSTNAME=lfs" > /etc/sysconfig/network</userinput></screen>
|
||||
<screen><userinput>echo "HOSTNAME=<replaceable>[lfs]</replaceable>" > /etc/sysconfig/network</userinput></screen>
|
||||
|
||||
<para><quote>lfs</quote> needs to be replaced with the name the computer is
|
||||
<para><replaceable>[lfs]</replaceable> needs to be replaced with the name the computer is
|
||||
to be called. You should not enter the FQDN (Fully Qualified Domain
|
||||
Name) here. That information will be put in the
|
||||
<filename>/etc/hosts</filename> file later on.</para>
|
||||
|
@ -18,12 +18,14 @@
|
||||
<secondary>/etc/hosts</secondary></indexterm>
|
||||
|
||||
<para>If a network card is to be configured, you have to decide on the
|
||||
IP-address, FQDN and possible aliases for use in the /etc/hosts file. The
|
||||
IP-address, FQDN and possible aliases for use in the <filename>/etc/hosts</filename> file. The
|
||||
syntax is:</para>
|
||||
|
||||
<screen><IP address> myhost.example.org aliases</screen>
|
||||
|
||||
<para>Unless your computer is to be visible to the Internet (e.g. you have a registered domain and a valid block of assigned IP addresses - most of us don't have this)you should make sure that the IP-address is in the private network
|
||||
<para>Unless your computer is to be visible to the Internet (e.g., you have a
|
||||
registered domain and a valid block of assigned IP addresses - most of us don't
|
||||
have this) you should make sure that the IP-address is in the private network
|
||||
IP-address range. Valid ranges are:</para>
|
||||
|
||||
<screen> Class Networks
|
||||
@ -32,7 +34,8 @@ IP-address range. Valid ranges are:</para>
|
||||
C 192.168.0.0 through 192.168.255.0</screen>
|
||||
|
||||
<para>A valid IP address could be 192.168.1.1. A valid FQDN for this IP could
|
||||
be www.linuxfromscratch.org (not recommended as this is a valid registered domain address and could cause your domain name server problems).</para>
|
||||
be www.linuxfromscratch.org (not recommended as this is a valid registered domain
|
||||
address and could cause your domain name server problems).</para>
|
||||
|
||||
<para>If you aren't going to use a network card, you still need to
|
||||
come up with a FQDN. This is necessary for certain programs to operate
|
||||
@ -41,27 +44,27 @@ correctly.</para>
|
||||
<para>If a network card is not going to be configured, create the
|
||||
<filename>/etc/hosts</filename> file by running:</para>
|
||||
|
||||
<screen><userinput>cat > /etc/hosts << "EOF"</userinput>
|
||||
<screen><userinput>cat > /etc/hosts << "EOF"
|
||||
# Begin /etc/hosts (no network card version)
|
||||
|
||||
127.0.0.1 <value of HOSTNAME>.example.org <value of HOSTNAME> localhost
|
||||
127.0.0.1 <replaceable>[<value of HOSTNAME>.example.org]</replaceable> <replaceable>[value of HOSTNAME]</replaceable> localhost
|
||||
|
||||
# End /etc/hosts (no network card version)
|
||||
<userinput>EOF</userinput></screen>
|
||||
EOF</userinput></screen>
|
||||
|
||||
<para>If a network card is to be configured, create the
|
||||
<filename>/etc/hosts</filename> file by running:</para>
|
||||
|
||||
<screen><userinput>cat > /etc/hosts << "EOF"</userinput>
|
||||
<screen><userinput>cat > /etc/hosts << "EOF"
|
||||
# Begin /etc/hosts (network card version)
|
||||
|
||||
127.0.0.1 localhost
|
||||
192.168.1.1 <value of HOSTNAME>.example.org <value of HOSTNAME>
|
||||
<replaceable>[192.168.1.1]</replaceable> <replaceable>[<value of HOSTNAME>.example.org]</replaceable> <replaceable>[value of HOSTNAME]</replaceable>
|
||||
|
||||
# End /etc/hosts (network card version)
|
||||
<userinput>EOF</userinput></screen>
|
||||
EOF</userinput></screen>
|
||||
|
||||
<para>Of course, the 192.168.1.1 and <value of HOSTNAME>.example.org
|
||||
<para>Of course, the <replaceable>[192.168.1.1]</replaceable> and <replaceable>[<value of HOSTNAME>.example.org]</replaceable>
|
||||
have to be changed to your liking (or requirements if assigned an IP-address
|
||||
by a network/system administrator and this machine is planned to be connected
|
||||
to an existing network).</para>
|
||||
|
@ -7,7 +7,9 @@
|
||||
<title>Creating the /etc/inputrc file</title>
|
||||
<?dbhtml filename="inputrc.html"?>
|
||||
|
||||
<para><filename>Inputrc</filename> deals with the mapping of the keyboard for
|
||||
<indexterm zone="ch-scripts-inputrc"><primary sortas="e-/etc/inputrc">/etc/inputrc</primary></indexterm>
|
||||
|
||||
<para><filename>/etc/inputrc</filename> deals with the mapping of the keyboard for
|
||||
certain situations. This file is the start-up file used by
|
||||
<application>readline</application> - the input related library used by
|
||||
<application>Bash</application> and most other shells.</para>
|
||||
@ -26,7 +28,7 @@ file. A later page sets up <application>Bash</application> to use
|
||||
<filename>/etc/profile</filename> is read (usually at login). If you
|
||||
want your system to use both, or don't want <emphasis>global</emphasis>
|
||||
keyboard handling, it is a good idea to place a default
|
||||
<filename>.inputrc</filename> into the <filename>/etc/skel</filename>
|
||||
<filename>.inputrc</filename> into the <filename class="directory">/etc/skel</filename>
|
||||
directory for use with new users.</para>
|
||||
|
||||
<para>
|
||||
@ -36,17 +38,17 @@ can <emphasis>not</emphasis> be on the same line as commands.
|
||||
</para>
|
||||
|
||||
<para>If you will create an <filename>.inputrc</filename> in
|
||||
<filename>/etc/skel</filename> using the command below, change the
|
||||
<filename class="directory">/etc/skel</filename> using the command below, change the
|
||||
command's output to <filename>/etc/skel/.inputrc</filename> and be
|
||||
sure to check/set permissions afterward. Then you can just copy that
|
||||
file to <filename>/etc/inputrc</filename> and the home directory
|
||||
of any user already existing in the system, including root, that needs
|
||||
a private version of the file. Be sure to use the <option>-p</option> parameter
|
||||
a private version of the file. Be sure to use the <parameter>-p</parameter> parameter
|
||||
of <command>cp</command> to maintain permissions and be sure to change owner and group
|
||||
appropriately.
|
||||
</para>
|
||||
|
||||
<screen><userinput>cat > /etc/inputrc << "EOF"</userinput>
|
||||
<screen><userinput>cat > /etc/inputrc << "EOF"
|
||||
# Begin /etc/inputrc
|
||||
|
||||
# Make sure we don't output everything on the 1 line
|
||||
@ -89,6 +91,6 @@ set bell-style none
|
||||
"\e[F": end-of-line
|
||||
|
||||
# End /etc/inputrc
|
||||
<userinput>EOF</userinput></screen>
|
||||
EOF</userinput></screen>
|
||||
|
||||
</sect1>
|
||||
|
@ -16,7 +16,7 @@ card.</para>
|
||||
|
||||
<para>If you don't have any network cards, you are most likely not going to
|
||||
create any configuration files relating to network cards. If that is the
|
||||
case, you must remove the <filename>network</filename> symlinks from all the
|
||||
case, you must remove the <filename class="symlink">network</filename> symlinks from all the
|
||||
run-level directories
|
||||
(<filename class="directory">/etc/rc.d/rc*.d</filename>)</para>
|
||||
|
||||
@ -24,36 +24,36 @@ run-level directories
|
||||
<title>Creating network interface configuration files</title>
|
||||
|
||||
<para>Which interfaces are brought up and down by the network script depends on
|
||||
the files in the /etc/sysconfig/network-devices directory. This
|
||||
directory should contain files in the form of ifconfig.xyz, where xyz is a
|
||||
the files in the <filename class="directory">/etc/sysconfig/network-devices</filename> directory. This
|
||||
directory should contain files in the form of <filename>ifconfig.xyz</filename>, where <quote>xyz</quote> is a
|
||||
network interface name (such as eth0 or eth0:1)</para>
|
||||
|
||||
<para>If you decide to rename or move this /etc/sysconfig/network-devices
|
||||
directory, make sure you update the /etc/sysconfig/rc file as well and
|
||||
update the network_devices by providing it with the new path.</para>
|
||||
<para>If you decide to rename or move this <filename class="directory">/etc/sysconfig/network-devices</filename>
|
||||
directory, make sure you update the <filename>/etc/sysconfig/rc</filename> file as well and
|
||||
update the <quote>network_devices</quote> by providing it with the new path.</para>
|
||||
|
||||
<para>Now, new files are created in that directory.
|
||||
The following command creates a sample ifconfig.eth0 file:</para>
|
||||
The following command creates a sample <filename>ifconfig.eth0</filename> file:</para>
|
||||
|
||||
<screen><userinput>cat > /etc/sysconfig/network-devices/ifconfig.eth0 << "EOF"</userinput>
|
||||
<screen><userinput>cat > /etc/sysconfig/network-devices/ifconfig.eth0 << "EOF"
|
||||
ONBOOT=yes
|
||||
SERVICE=static
|
||||
IP=192.168.1.1
|
||||
GATEWAY=192.168.1.2
|
||||
NETMASK=255.255.255.0
|
||||
BROADCAST=192.168.1.255
|
||||
<userinput>EOF</userinput></screen>
|
||||
EOF</userinput></screen>
|
||||
|
||||
<para>Of course, the values of those variables have to be changed
|
||||
in every file to match the proper setup. If the ONBOOT variable is set
|
||||
to yes, the network script will bring up the equivalent NIC (Network Interface Card)
|
||||
to <quote>yes</quote>, the network script will bring up the equivalent NIC (Network Interface Card)
|
||||
during the booting of the system.
|
||||
If set to anything but yes, the equivalent NIC will be ignored by the network script
|
||||
If set to anything but <quote>yes</quote>, the equivalent NIC will be ignored by the network script
|
||||
and not brought up.</para>
|
||||
|
||||
<para>The SERVICE entry defines the method of obtaining the IP address.
|
||||
The LFS bootscripts have a modular IP assignment format, and by creating
|
||||
additional files in /etc/sysconfig/network-devices/services, you can allow
|
||||
additional files in <filename class="directory">/etc/sysconfig/network-devices/services</filename>, you can allow
|
||||
other IP assignment methods. This would commonly be used if you need DHCP,
|
||||
which is addressed in the BLFS book.</para>
|
||||
|
||||
@ -62,8 +62,9 @@ have one. If not, then comment out the variable entirely.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<sect2 id="resolv.conf">
|
||||
<title>Creating the /etc/resolv.conf file</title>
|
||||
<indexterm zone="resolv.conf"><primary sortas="e-/etc/resolv.conf">/etc/resolv.conf</primary></indexterm>
|
||||
|
||||
<para>If you're going to be connected to the Internet then most likely you'll
|
||||
need some means of DNS name resolution to resolve Internet domain names to IP
|
||||
@ -71,15 +72,15 @@ addresses. This is best achieved by placing the IP address of your DNS, availabl
|
||||
into <filename>/etc/resolv.conf</filename>. Create the file by running the
|
||||
following:</para>
|
||||
|
||||
<screen><userinput>cat > /etc/resolv.conf << "EOF"</userinput>
|
||||
<screen><userinput>cat > /etc/resolv.conf << "EOF"
|
||||
# Begin /etc/resolv.conf
|
||||
|
||||
nameserver <IP address of your nameserver>
|
||||
nameserver <replaceable>[IP address of your nameserver]</replaceable>
|
||||
|
||||
# End /etc/resolv.conf
|
||||
<userinput>EOF</userinput></screen>
|
||||
EOF</userinput></screen>
|
||||
|
||||
<para>Of course, replace <IP address of your nameserver> with the IP
|
||||
<para>Of course, replace <replaceable>[IP address of your nameserver]</replaceable> with the IP
|
||||
address of the DNS most appropriate for your setup. There will often be
|
||||
more than one entry (requirements demand secondary servers for fallback capability). The IP address may even be a router on your local network.</para>
|
||||
|
||||
|
@ -7,8 +7,10 @@
|
||||
<title>The Bash Shell Startup Files</title>
|
||||
<?dbhtml filename="profile.html"?>
|
||||
|
||||
<para>The shell program <filename>/bin/bash</filename> (hereafter
|
||||
referred to as just "the shell") uses a collection of startup files to
|
||||
<indexterm zone="ch-scripts-profile"><primary sortas="e-/etc/profile">/etc/profile</primary></indexterm>
|
||||
|
||||
<para>The shell program <command>/bin/bash</command> (hereafter
|
||||
referred to as just <quote>the shell</quote>) uses a collection of startup files to
|
||||
help create an environment to run in. Each file has a specific use and
|
||||
may affect login and interactive environments differently. The files in
|
||||
the <filename class="directory">/etc</filename> directory generally provide global
|
||||
@ -17,9 +19,9 @@ override the global settings.
|
||||
</para>
|
||||
|
||||
<para>An interactive login shell is started after a successful login, using
|
||||
<filename>/bin/login</filename>, by reading the
|
||||
<command>/bin/login</command>, by reading the
|
||||
<filename>/etc/passwd</filename> file. An
|
||||
interactive non-login shell is started at the command-line (e.g.
|
||||
interactive non-login shell is started at the command-line (e.g.,
|
||||
<prompt>[prompt]$</prompt><command>/bin/bash</command>). A non-interactive
|
||||
shell is usually present when a shell script is running. It is non-interactive
|
||||
because it is processing a script and not waiting for user input between
|
||||
@ -35,31 +37,32 @@ as an interactive login shell.</para>
|
||||
|
||||
<para>A base <filename>/etc/profile</filename> created below only sets some
|
||||
environment variables necessary for Bash to accept keystrokes properly,
|
||||
even in non-English locale. Replace "ll" with the
|
||||
two-letter code for your language (e.g. "en") and
|
||||
"CC" with the two-letter code for your country
|
||||
(e.g. "GB"). Also you may need to specify
|
||||
even in non-English locale. Replace <replaceable>[ll]</replaceable> with the
|
||||
two-letter code for your language (e.g., <quote>en</quote>) and
|
||||
<replaceable>[CC]</replaceable> with the two-letter code for your country
|
||||
(e.g., <quote>GB</quote>). Also you may need to specify
|
||||
(and this is actually the preferred form) your
|
||||
character encoding (e.g. "iso8859-1") after a dot (so that the result
|
||||
is "en_GB.iso8859-1").
|
||||
character encoding (e.g. <quote>iso8859-1</quote>) after a dot (so that the result
|
||||
is <quote>en_GB.iso8859-1</quote>).
|
||||
Issue the following command for more information:</para>
|
||||
|
||||
<screen><userinput>man 3 setlocale</userinput></screen>
|
||||
|
||||
<para>The list of all locales supported by glibc can be obtained by running
|
||||
<para>The list of all locales supported by Glibc can be obtained by running
|
||||
the following command:</para>
|
||||
|
||||
<screen><userinput>locale -a</userinput></screen>
|
||||
|
||||
<para>Now, when you are sure about your locale settings, create the
|
||||
<filename>/etc/profile</filename> file:</para>
|
||||
|
||||
<screen><userinput>cat > /etc/profile << "EOF"
|
||||
# Begin /etc/profile
|
||||
# Written for Linux From Scratch
|
||||
# by Alexander E. Patrakov
|
||||
|
||||
export LC_ALL=ll_CC
|
||||
export LANG=ll_CC
|
||||
export LC_ALL=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>
|
||||
export LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>
|
||||
export INPUTRC=/etc/inputrc
|
||||
|
||||
# End /etc/profile
|
||||
|
@ -11,7 +11,7 @@
|
||||
<primary sortas="d-setclock">setclock</primary>
|
||||
<secondary>configuring</secondary></indexterm>
|
||||
|
||||
<para>This setclock script reads the time from your hardware clock, also
|
||||
<para>This <command>setclock</command> script reads the time from your hardware clock, also
|
||||
known as BIOS or CMOS (Complementry Metal-Oxide Semiconductor) clock, and either converts that time to localtime
|
||||
using the <filename>/etc/localtime</filename> file (if the hardware clock
|
||||
is set to GMT) or not (if the hardware clock is already set to localtime).
|
||||
@ -19,19 +19,19 @@ There is no way to auto-detect whether the hardware clock is set to GMT or
|
||||
not, so we need to configure that here ourselves.</para>
|
||||
|
||||
<para>Change the value of the <emphasis>UTC</emphasis> variable below to a
|
||||
<emphasis>0</emphasis> (zero) if your hardware clock is not set to GMT
|
||||
<parameter>0</parameter> (zero) if your hardware clock is not set to GMT
|
||||
time.</para>
|
||||
|
||||
<para>Create a new file <filename>/etc/sysconfig/clock</filename> by running
|
||||
the following:</para>
|
||||
|
||||
<screen><userinput>cat > /etc/sysconfig/clock << "EOF"</userinput>
|
||||
<screen><userinput>cat > /etc/sysconfig/clock << "EOF"
|
||||
# Begin /etc/sysconfig/clock
|
||||
|
||||
UTC=1
|
||||
|
||||
# End /etc/sysconfig/clock
|
||||
<userinput>EOF</userinput></screen>
|
||||
EOF</userinput></screen>
|
||||
|
||||
<para>Now, you may want to take a look at a very good hint explaining how we
|
||||
deal with time on LFS at <ulink url="&hints-root;time.txt"/>.
|
||||
|
@ -12,7 +12,7 @@
|
||||
<secondary>configuring</secondary></indexterm>
|
||||
|
||||
<para>The <filename>sysklogd</filename> script invokes the
|
||||
<command>syslogd</command> program with the <emphasis>-m 0</emphasis> option.
|
||||
<command>syslogd</command> program with the <parameter>-m 0</parameter> option.
|
||||
This option turns off the periodic timestamp mark that
|
||||
<command>syslogd</command> writes to the log files every 20 minutes by default.
|
||||
If you want to turn on this periodic timestamp mark, edit the
|
||||
|
@ -21,7 +21,7 @@ accepted standards.</para>
|
||||
<para>SysVinit (which we'll call <emphasis>init</emphasis> from now on) works
|
||||
using a run-levels scheme. There are 7 (from 0 to 6) run-levels
|
||||
(actually, there are more run-levels but they are for special cases and
|
||||
generally not used. The init man page describes those details), and each
|
||||
generally not used. The <command>init</command> man page describes those details), and each
|
||||
one of those corresponds to the things the computer is supposed to do when
|
||||
it starts up. The default run-level is 3. Here are the descriptions of the
|
||||
different run-levels as they are often implemented:</para>
|
||||
@ -36,13 +36,14 @@ different run-levels as they are often implemented:</para>
|
||||
|
||||
<para>The command used to change run-levels is <command>init
|
||||
<runlevel></command> where <runlevel> is the target run-level. For
|
||||
example, to reboot the computer, a user would issue the <command>init
|
||||
6</command> command. The <command>reboot</command> command is just an alias for
|
||||
example, to reboot the computer, a user would issue the <userinput>init
|
||||
6</userinput> command. The <command>reboot</command> command is just an alias for
|
||||
it, as is the <command>halt</command> command an alias for <command>init
|
||||
0</command>.</para>
|
||||
|
||||
<para>There are a number of directories under <filename>/etc/rc.d</filename>
|
||||
that look like like rc?.d (where ? is the number of the run-level) and rcsysinit.d
|
||||
<para>There are a number of directories under <filename class="directory">/etc/rc.d</filename>
|
||||
that look like like <filename class="directory">rc?.d</filename> (where ? is the
|
||||
number of the run-level) and <filename class="directory">rcsysinit.d</filename>
|
||||
all containing a number of symbolic links. Some begin with a K, the others begin
|
||||
with an S, and all of them have two numbers following the initial letter. The K
|
||||
means to stop (kill) a service, and the S means to start a service. The numbers
|
||||
@ -50,17 +51,20 @@ determine the order in which the scripts are run, from 00 to 99; the lower the
|
||||
number the sooner it gets executed. When init switches to another run-level, the
|
||||
appropriate services get killed and others get started.</para>
|
||||
|
||||
<para>The real scripts are in /etc/rc.d/init.d. They do all the work, and the
|
||||
symlinks all point to them. Killing links and starting links point to
|
||||
the same script in /etc/rc.d/init.d. That's because the scripts can be
|
||||
called with different parameters like start, stop, restart, reload,
|
||||
status. When a K link is encountered, the appropriate script is run with
|
||||
the stop argument. When an S link is encountered, the appropriate script
|
||||
is run with the start argument.</para>
|
||||
<para>The real scripts are in <filename class="directory">/etc/rc.d/init.d</filename>.
|
||||
They do all the work, and the symlinks all point to them. Killing links and starting links
|
||||
point to the same script in <filename class="directory">/etc/rc.d/init.d</filename>.
|
||||
That's because the scripts can be called with different parameters like
|
||||
<parameter>start</parameter>, <parameter>stop</parameter>,
|
||||
<parameter>restart</parameter>, <parameter>reload</parameter>,
|
||||
<parameter>status</parameter>. When a K link is encountered, the appropriate
|
||||
script is run with the <parameter>stop</parameter> argument. When an S link is
|
||||
encountered, the appropriate script is run with the <parameter>start</parameter>
|
||||
argument.</para>
|
||||
|
||||
<para>There is one exception. Links that start with an S in the
|
||||
rc0.d and rc6.d directories will not cause anything to be started. They
|
||||
will be called with the parameter <emphasis>stop</emphasis> to stop
|
||||
will be called with the parameter <parameter>stop</parameter> to stop
|
||||
something. The logic behind it is that when you are going to reboot or
|
||||
halt the system, you don't want to start anything, only stop the
|
||||
system.</para>
|
||||
@ -68,26 +72,34 @@ system.</para>
|
||||
<para>These are descriptions of what the arguments make the
|
||||
scripts do:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>start</parameter></term>
|
||||
<listitem><para>The service is started.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<listitem><para><emphasis>start</emphasis>: The service is
|
||||
started.</para></listitem>
|
||||
<varlistentry>
|
||||
<term><parameter>stop</parameter></term>
|
||||
<listitem><para>The service is stopped.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<listitem><para><emphasis>stop</emphasis>: The service is
|
||||
stopped.</para></listitem>
|
||||
<varlistentry>
|
||||
<term><parameter>restart</parameter></term>
|
||||
<listitem><para>The service is stopped and then started again.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<listitem><para><emphasis>restart</emphasis>: The service is
|
||||
stopped and then started again.</para></listitem>
|
||||
|
||||
<listitem><para><emphasis>reload</emphasis>: The configuration
|
||||
of the service is updated.
|
||||
<varlistentry>
|
||||
<term><parameter>reload</parameter></term>
|
||||
<listitem><para>The configuration of the service is updated.
|
||||
This is used after the configuration file of a service was modified, when
|
||||
the service doesn't need to be restarted.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<listitem><para><emphasis>status</emphasis>: Tells if the service
|
||||
is running and with which PIDs.</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
<varlistentry>
|
||||
<term><parameter>status</parameter></term>
|
||||
<listitem><para>Tells if the service is running and with which PIDs.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
<para>Feel free to modify the way the boot process works (after all, it's your
|
||||
own LFS system). The files given here are just an example of how it can be
|
||||
|
Loading…
Reference in New Issue
Block a user