mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-19 03:39:20 +01:00
Chapter07 indentation.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7230 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
b78c7479d4
commit
d781ffbe09
@ -1,28 +1,43 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||||
%general-entities;
|
%general-entities;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<sect1 id="ch-scripts-bootscripts" role="wrap">
|
<sect1 id="ch-scripts-bootscripts" role="wrap">
|
||||||
<title>LFS-Bootscripts-&lfs-bootscripts-version;</title>
|
|
||||||
<?dbhtml filename="bootscripts.html"?>
|
<?dbhtml filename="bootscripts.html"?>
|
||||||
|
|
||||||
<indexterm zone="ch-scripts-bootscripts"><primary sortas="a-Bootscripts">Bootscripts</primary></indexterm>
|
<title>LFS-Bootscripts-&lfs-bootscripts-version;</title>
|
||||||
|
|
||||||
|
<indexterm zone="ch-scripts-bootscripts">
|
||||||
|
<primary sortas="a-Bootscripts">Bootscripts</primary>
|
||||||
|
</indexterm>
|
||||||
|
|
||||||
|
<sect2 role="package">
|
||||||
|
<title/>
|
||||||
|
|
||||||
<sect2 role="package"><title/>
|
|
||||||
<para>The LFS-Bootscripts package contains a set of scripts to start/stop the
|
<para>The LFS-Bootscripts package contains a set of scripts to start/stop the
|
||||||
LFS system at bootup/shutdown.</para>
|
LFS system at bootup/shutdown.</para>
|
||||||
|
|
||||||
<segmentedlist>
|
<segmentedlist>
|
||||||
<segtitle>&buildtime;</segtitle>
|
<segtitle>&buildtime;</segtitle>
|
||||||
<segtitle>&diskspace;</segtitle>
|
<segtitle>&diskspace;</segtitle>
|
||||||
<seglistitem><seg>0.1 SBU</seg><seg>516 KB</seg></seglistitem>
|
|
||||||
|
<seglistitem>
|
||||||
|
<seg>0.1 SBU</seg>
|
||||||
|
<seg>516 KB</seg>
|
||||||
|
</seglistitem>
|
||||||
</segmentedlist>
|
</segmentedlist>
|
||||||
|
|
||||||
<segmentedlist>
|
<segmentedlist>
|
||||||
<segtitle>&dependencies;</segtitle>
|
<segtitle>&dependencies;</segtitle>
|
||||||
<seglistitem><seg>Bash and Coreutils</seg></seglistitem>
|
|
||||||
|
<seglistitem>
|
||||||
|
<seg>Bash and Coreutils</seg>
|
||||||
|
</seglistitem>
|
||||||
</segmentedlist>
|
</segmentedlist>
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2 role="installation">
|
<sect2 role="installation">
|
||||||
@ -34,55 +49,69 @@ LFS system at bootup/shutdown.</para>
|
|||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2 id="contents-bootscripts" role="content"><title>Contents of LFS-Bootscripts</title>
|
<sect2 id="contents-bootscripts" role="content">
|
||||||
|
<title>Contents of LFS-Bootscripts</title>
|
||||||
|
|
||||||
<segmentedlist>
|
<segmentedlist>
|
||||||
<segtitle>Installed scripts</segtitle>
|
<segtitle>Installed scripts</segtitle>
|
||||||
<seglistitem><seg>checkfs, cleanfs, console, functions, halt, hotplug, ifdown, ifup,
|
|
||||||
localnet, mountfs, mountkernfs, network, rc, reboot, sendsignals, setclock, static,
|
<seglistitem>
|
||||||
swap, sysklogd, template, and udev</seg></seglistitem>
|
<seg>checkfs, cleanfs, console, functions, halt, hotplug, ifdown, ifup,
|
||||||
|
localnet, mountfs, mountkernfs, network, rc, reboot, sendsignals,
|
||||||
|
setclock, static, swap, sysklogd, template, and udev</seg>
|
||||||
|
</seglistitem>
|
||||||
</segmentedlist>
|
</segmentedlist>
|
||||||
|
|
||||||
<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
<variablelist>
|
||||||
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
||||||
<?dbfo list-presentation="list"?>
|
<?dbfo list-presentation="list"?>
|
||||||
<?dbhtml list-presentation="table"?>
|
<?dbhtml list-presentation="table"?>
|
||||||
|
|
||||||
<varlistentry id="checkfs-bootscripts">
|
<varlistentry id="checkfs-bootscripts">
|
||||||
<term><command>checkfs</command></term>
|
<term><command>checkfs</command></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Checks the integrity of the file systems before they are mounted (with the
|
<para>Checks the integrity of the file systems before they are mounted
|
||||||
exception of journal and network based file systems)</para>
|
(with the exception of journal and network based file systems)</para>
|
||||||
<indexterm zone="ch-scripts-bootscripts checkfs-bootscripts"><primary sortas="d-checkfs">checkfs</primary></indexterm>
|
<indexterm zone="ch-scripts-bootscripts checkfs-bootscripts">
|
||||||
|
<primary sortas="d-checkfs">checkfs</primary>
|
||||||
|
</indexterm>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry id="cleanfs-bootscripts">
|
<varlistentry id="cleanfs-bootscripts">
|
||||||
<term><command>cleanfs</command></term>
|
<term><command>cleanfs</command></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Removes files that should not be
|
<para>Removes files that should not be preserved between reboots, such
|
||||||
preserved between reboots, such as those in <filename class="directory">/var/run/</filename> and
|
as those in <filename class="directory">/var/run/</filename> and
|
||||||
<filename class="directory">/var/lock/</filename>; it re-creates <filename>/var/run/utmp</filename>
|
<filename class="directory">/var/lock/</filename>; it re-creates
|
||||||
and removes the possibly present <filename>/etc/nologin</filename>,
|
<filename>/var/run/utmp</filename> and removes the possibly present
|
||||||
<filename>/fastboot</filename>, and <filename>/forcefsck</filename> files</para>
|
<filename>/etc/nologin</filename>, <filename>/fastboot</filename>, and
|
||||||
<indexterm zone="ch-scripts-bootscripts cleanfs-bootscripts"><primary sortas="d-cleanfs">cleanfs</primary></indexterm>
|
<filename>/forcefsck</filename> files</para>
|
||||||
|
<indexterm zone="ch-scripts-bootscripts cleanfs-bootscripts">
|
||||||
|
<primary sortas="d-cleanfs">cleanfs</primary>
|
||||||
|
</indexterm>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry id="console-bootscripts">
|
<varlistentry id="console-bootscripts">
|
||||||
<term><command>console</command></term>
|
<term><command>console</command></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Loads the correct keymap table for the desired keyboard layout; it also
|
<para>Loads the correct keymap table for the desired keyboard layout;
|
||||||
sets the screen font</para>
|
it also sets the screen font</para>
|
||||||
<indexterm zone="ch-scripts-bootscripts console-bootscripts"><primary sortas="d-console">console</primary></indexterm>
|
<indexterm zone="ch-scripts-bootscripts console-bootscripts">
|
||||||
|
<primary sortas="d-console">console</primary>
|
||||||
|
</indexterm>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry id="functions-bootscripts">
|
<varlistentry id="functions-bootscripts">
|
||||||
<term><command>functions</command></term>
|
<term><command>functions</command></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Contains common functions, such as error and status checking, that are
|
<para>Contains common functions, such as error and status checking,
|
||||||
used by several bootscripts</para>
|
that are used by several bootscripts</para>
|
||||||
<indexterm zone="ch-scripts-bootscripts functions-bootscripts"><primary sortas="d-functions">functions</primary></indexterm>
|
<indexterm zone="ch-scripts-bootscripts functions-bootscripts">
|
||||||
|
<primary sortas="d-functions">functions</primary>
|
||||||
|
</indexterm>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@ -90,7 +119,9 @@ used by several bootscripts</para>
|
|||||||
<term><command>halt</command></term>
|
<term><command>halt</command></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Halts the system</para>
|
<para>Halts the system</para>
|
||||||
<indexterm zone="ch-scripts-bootscripts halt-bootscripts"><primary sortas="d-halt">halt</primary></indexterm>
|
<indexterm zone="ch-scripts-bootscripts halt-bootscripts">
|
||||||
|
<primary sortas="d-halt">halt</primary>
|
||||||
|
</indexterm>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@ -98,7 +129,9 @@ used by several bootscripts</para>
|
|||||||
<term><command>hotplug</command></term>
|
<term><command>hotplug</command></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Loads modules for system devices</para>
|
<para>Loads modules for system devices</para>
|
||||||
<indexterm zone="ch-scripts-bootscripts hotplug-bootscripts"><primary sortas="d-hotplug">hotplug</primary></indexterm>
|
<indexterm zone="ch-scripts-bootscripts hotplug-bootscripts">
|
||||||
|
<primary sortas="d-hotplug">hotplug</primary>
|
||||||
|
</indexterm>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@ -106,7 +139,9 @@ used by several bootscripts</para>
|
|||||||
<term><command>ifdown</command></term>
|
<term><command>ifdown</command></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Assists the network script with stopping network devices</para>
|
<para>Assists the network script with stopping network devices</para>
|
||||||
<indexterm zone="ch-scripts-bootscripts ifdown-bootscripts"><primary sortas="d-ifdown">ifdown</primary></indexterm>
|
<indexterm zone="ch-scripts-bootscripts ifdown-bootscripts">
|
||||||
|
<primary sortas="d-ifdown">ifdown</primary>
|
||||||
|
</indexterm>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@ -114,7 +149,9 @@ used by several bootscripts</para>
|
|||||||
<term><command>ifup</command></term>
|
<term><command>ifup</command></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Assists the network script with starting network devices</para>
|
<para>Assists the network script with starting network devices</para>
|
||||||
<indexterm zone="ch-scripts-bootscripts ifup-bootscripts"><primary sortas="d-ifup">ifup</primary></indexterm>
|
<indexterm zone="ch-scripts-bootscripts ifup-bootscripts">
|
||||||
|
<primary sortas="d-ifup">ifup</primary>
|
||||||
|
</indexterm>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@ -122,7 +159,9 @@ used by several bootscripts</para>
|
|||||||
<term><command>localnet</command></term>
|
<term><command>localnet</command></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Sets up the system's hostname and local loopback device</para>
|
<para>Sets up the system's hostname and local loopback device</para>
|
||||||
<indexterm zone="ch-scripts-bootscripts localnet-bootscripts"><primary sortas="d-localnet">localnet</primary></indexterm>
|
<indexterm zone="ch-scripts-bootscripts localnet-bootscripts">
|
||||||
|
<primary sortas="d-localnet">localnet</primary>
|
||||||
|
</indexterm>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@ -131,7 +170,9 @@ used by several bootscripts</para>
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>Mounts all file systems, except ones that are marked
|
<para>Mounts all file systems, except ones that are marked
|
||||||
<emphasis>noauto</emphasis> or are network based</para>
|
<emphasis>noauto</emphasis> or are network based</para>
|
||||||
<indexterm zone="ch-scripts-bootscripts mountfs-bootscripts"><primary sortas="d-mountfs">mountfs</primary></indexterm>
|
<indexterm zone="ch-scripts-bootscripts mountfs-bootscripts">
|
||||||
|
<primary sortas="d-mountfs">mountfs</primary>
|
||||||
|
</indexterm>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@ -140,7 +181,9 @@ used by several bootscripts</para>
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>Mounts virtual kernel file systems, such as <systemitem
|
<para>Mounts virtual kernel file systems, such as <systemitem
|
||||||
class="filesystem">proc</systemitem></para>
|
class="filesystem">proc</systemitem></para>
|
||||||
<indexterm zone="ch-scripts-bootscripts mountkernfs-bootscripts"><primary sortas="d-mountkernfs">mountkernfs</primary></indexterm>
|
<indexterm zone="ch-scripts-bootscripts mountkernfs-bootscripts">
|
||||||
|
<primary sortas="d-mountkernfs">mountkernfs</primary>
|
||||||
|
</indexterm>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@ -149,17 +192,21 @@ class="filesystem">proc</systemitem></para>
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>Sets up network interfaces, such as network cards, and sets up
|
<para>Sets up network interfaces, such as network cards, and sets up
|
||||||
the default gateway (where applicable)</para>
|
the default gateway (where applicable)</para>
|
||||||
<indexterm zone="ch-scripts-bootscripts network-bootscripts"><primary sortas="d-network">network</primary></indexterm>
|
<indexterm zone="ch-scripts-bootscripts network-bootscripts">
|
||||||
|
<primary sortas="d-network">network</primary>
|
||||||
|
</indexterm>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry id="rc-bootscripts">
|
<varlistentry id="rc-bootscripts">
|
||||||
<term><command>rc</command></term>
|
<term><command>rc</command></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>The master run-level control script; it is responsible for running all the
|
<para>The master run-level control script; it is responsible for
|
||||||
other bootscripts one-by-one, in a sequence determined by the name of the
|
running all the other bootscripts one-by-one, in a sequence determined
|
||||||
symbolic links being processed</para>
|
by the name of the symbolic links being processed</para>
|
||||||
<indexterm zone="ch-scripts-bootscripts rc-bootscripts"><primary sortas="d-rc">rc</primary></indexterm>
|
<indexterm zone="ch-scripts-bootscripts rc-bootscripts">
|
||||||
|
<primary sortas="d-rc">rc</primary>
|
||||||
|
</indexterm>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@ -167,7 +214,9 @@ symbolic links being processed</para>
|
|||||||
<term><command>reboot</command></term>
|
<term><command>reboot</command></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Reboots the system</para>
|
<para>Reboots the system</para>
|
||||||
<indexterm zone="ch-scripts-bootscripts reboot-bootscripts"><primary sortas="d-reboot">reboot</primary></indexterm>
|
<indexterm zone="ch-scripts-bootscripts reboot-bootscripts">
|
||||||
|
<primary sortas="d-reboot">reboot</primary>
|
||||||
|
</indexterm>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@ -176,7 +225,9 @@ symbolic links being processed</para>
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>Makes sure every process is terminated before the system reboots
|
<para>Makes sure every process is terminated before the system reboots
|
||||||
or halts</para>
|
or halts</para>
|
||||||
<indexterm zone="ch-scripts-bootscripts sendsignals-bootscripts"><primary sortas="d-sendsignals">sendsignals</primary></indexterm>
|
<indexterm zone="ch-scripts-bootscripts sendsignals-bootscripts">
|
||||||
|
<primary sortas="d-sendsignals">sendsignals</primary>
|
||||||
|
</indexterm>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@ -185,7 +236,9 @@ or halts</para>
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>Resets the kernel clock to local time in case the hardware clock
|
<para>Resets the kernel clock to local time in case the hardware clock
|
||||||
is not set to UTC time</para>
|
is not set to UTC time</para>
|
||||||
<indexterm zone="ch-scripts-bootscripts setclock-bootscripts"><primary sortas="d-setclock">setclock</primary></indexterm>
|
<indexterm zone="ch-scripts-bootscripts setclock-bootscripts">
|
||||||
|
<primary sortas="d-setclock">setclock</primary>
|
||||||
|
</indexterm>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@ -194,7 +247,9 @@ is not set to UTC time</para>
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>Provides the functionality needed to assign a static Internet
|
<para>Provides the functionality needed to assign a static Internet
|
||||||
Protocol (IP) address to a network interface</para>
|
Protocol (IP) address to a network interface</para>
|
||||||
<indexterm zone="ch-scripts-bootscripts static-bootscripts"><primary sortas="d-static">static</primary></indexterm>
|
<indexterm zone="ch-scripts-bootscripts static-bootscripts">
|
||||||
|
<primary sortas="d-static">static</primary>
|
||||||
|
</indexterm>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@ -202,7 +257,9 @@ Protocol (IP) address to a network interface</para>
|
|||||||
<term><command>swap</command></term>
|
<term><command>swap</command></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Enables and disables swap files and partitions</para>
|
<para>Enables and disables swap files and partitions</para>
|
||||||
<indexterm zone="ch-scripts-bootscripts swap-bootscripts"><primary sortas="d-swap">swap</primary></indexterm>
|
<indexterm zone="ch-scripts-bootscripts swap-bootscripts">
|
||||||
|
<primary sortas="d-swap">swap</primary>
|
||||||
|
</indexterm>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@ -210,7 +267,9 @@ Protocol (IP) address to a network interface</para>
|
|||||||
<term><command>sysklogd</command></term>
|
<term><command>sysklogd</command></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Starts and stops the system and kernel log daemons</para>
|
<para>Starts and stops the system and kernel log daemons</para>
|
||||||
<indexterm zone="ch-scripts-bootscripts sysklogd-bootscripts"><primary sortas="d-sysklogd">sysklogd</primary></indexterm>
|
<indexterm zone="ch-scripts-bootscripts sysklogd-bootscripts">
|
||||||
|
<primary sortas="d-sysklogd">sysklogd</primary>
|
||||||
|
</indexterm>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@ -219,21 +278,25 @@ Protocol (IP) address to a network interface</para>
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>A template to create custom bootscripts for other
|
<para>A template to create custom bootscripts for other
|
||||||
daemons</para>
|
daemons</para>
|
||||||
<indexterm zone="ch-scripts-bootscripts template-bootscripts"><primary sortas="d-template">template</primary></indexterm>
|
<indexterm zone="ch-scripts-bootscripts template-bootscripts">
|
||||||
|
<primary sortas="d-template">template</primary>
|
||||||
|
</indexterm>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry id="udev-bootscripts">
|
<varlistentry id="udev-bootscripts">
|
||||||
<term><command>udev</command></term>
|
<term><command>udev</command></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Prepares the <filename class="directory">/dev</filename> directory and
|
<para>Prepares the <filename class="directory">/dev</filename>
|
||||||
starts Udev</para>
|
directory and starts Udev</para>
|
||||||
<indexterm zone="ch-scripts-bootscripts udev-bootscripts"><primary sortas="d-udev">udev</primary></indexterm>
|
<indexterm zone="ch-scripts-bootscripts udev-bootscripts">
|
||||||
|
<primary sortas="d-udev">udev</primary>
|
||||||
|
</indexterm>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||||
%general-entities;
|
%general-entities;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<chapter id="chapter-bootscripts" xreflabel="Chapter 7">
|
<chapter id="chapter-bootscripts" xreflabel="Chapter 7">
|
||||||
<?dbhtml dir="chapter07"?>
|
<?dbhtml dir="chapter07"?>
|
||||||
<title>Setting Up System Bootscripts</title>
|
|
||||||
<?dbhtml filename="chapter07.html"?>
|
<?dbhtml filename="chapter07.html"?>
|
||||||
|
|
||||||
|
<title>Setting Up System Bootscripts</title>
|
||||||
|
|
||||||
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/>
|
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/>
|
||||||
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bootscripts.xml"/>
|
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bootscripts.xml"/>
|
||||||
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="usage.xml"/>
|
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="usage.xml"/>
|
||||||
|
@ -1,15 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||||
%general-entities;
|
%general-entities;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<sect1 id="ch-scripts-console">
|
<sect1 id="ch-scripts-console">
|
||||||
<title>Configuring the Linux Console</title>
|
|
||||||
<?dbhtml filename="console.html"?>
|
<?dbhtml filename="console.html"?>
|
||||||
|
|
||||||
|
<title>Configuring the Linux Console</title>
|
||||||
|
|
||||||
<indexterm zone="ch-scripts-console">
|
<indexterm zone="ch-scripts-console">
|
||||||
<primary sortas="d-console">console</primary>
|
<primary sortas="d-console">console</primary>
|
||||||
<secondary>configuring</secondary></indexterm>
|
<secondary>configuring</secondary>
|
||||||
|
</indexterm>
|
||||||
|
|
||||||
<para>This section discusses how to configure the <command>console</command>
|
<para>This section discusses how to configure the <command>console</command>
|
||||||
bootscript that sets up the keyboard map and the console font. If non-ASCII
|
bootscript that sets up the keyboard map and the console font. If non-ASCII
|
||||||
@ -45,14 +49,16 @@ correct:</para>
|
|||||||
FONT="lat9-16 -u iso01"</literal>
|
FONT="lat9-16 -u iso01"</literal>
|
||||||
EOF</userinput></screen>
|
EOF</userinput></screen>
|
||||||
|
|
||||||
<note><para>The <envar>FONT</envar> line above is correct only for the ISO 8859-15
|
<note>
|
||||||
|
<para>The <envar>FONT</envar> line above is correct only for the ISO 8859-15
|
||||||
character set. If using ISO 8859-1 and, therefore, a pound sign
|
character set. If using ISO 8859-1 and, therefore, a pound sign
|
||||||
instead of Euro, the correct <envar>FONT</envar> line would be:</para>
|
instead of Euro, the correct <envar>FONT</envar> line would be:</para>
|
||||||
|
|
||||||
<screen role="nodump"><userinput>FONT="lat1-16"</userinput></screen></note>
|
<screen role="nodump"><userinput>FONT="lat1-16"</userinput></screen>
|
||||||
|
</note>
|
||||||
|
|
||||||
<para>If the <envar>KEYMAP</envar> or <envar>FONT</envar> variable is not set, the
|
<para>If the <envar>KEYMAP</envar> or <envar>FONT</envar> variable is not set,
|
||||||
<command>console</command> initscript will not run the corresponding
|
the <command>console</command> initscript will not run the corresponding
|
||||||
program.</para>
|
program.</para>
|
||||||
|
|
||||||
<para>In some keymaps, the Backspace and Delete keys send characters different
|
<para>In some keymaps, the Backspace and Delete keys send characters different
|
||||||
@ -104,4 +110,3 @@ difficult to ensure that the keymap is compiled into every one of
|
|||||||
them.</para>
|
them.</para>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
@ -1,15 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||||
%general-entities;
|
%general-entities;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<sect1 id="ch-scripts-hostname">
|
<sect1 id="ch-scripts-hostname">
|
||||||
<title>Configuring the localnet Script</title>
|
|
||||||
<?dbhtml filename="hostname.html"?>
|
<?dbhtml filename="hostname.html"?>
|
||||||
|
|
||||||
|
<title>Configuring the localnet Script</title>
|
||||||
|
|
||||||
<indexterm zone="ch-scripts-hostname">
|
<indexterm zone="ch-scripts-hostname">
|
||||||
<primary sortas="d-localnet">localnet</primary>
|
<primary sortas="d-localnet">localnet</primary>
|
||||||
<secondary>configuring</secondary></indexterm>
|
<secondary>configuring</secondary>
|
||||||
|
</indexterm>
|
||||||
|
|
||||||
<para>Part of the job of the <command>localnet</command> script is setting the
|
<para>Part of the job of the <command>localnet</command> script is setting the
|
||||||
system's hostname. This needs to be configured in the
|
system's hostname. This needs to be configured in the
|
||||||
@ -26,4 +30,3 @@ information will be put in the <filename>/etc/hosts</filename> file in the next
|
|||||||
section.</para>
|
section.</para>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||||
%general-entities;
|
%general-entities;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<sect1 id="ch-scripts-hosts">
|
<sect1 id="ch-scripts-hosts">
|
||||||
<title>Creating the /etc/hosts File</title>
|
|
||||||
<?dbhtml filename="hosts.html"?>
|
<?dbhtml filename="hosts.html"?>
|
||||||
|
|
||||||
<indexterm zone="ch-scripts-hosts"><primary sortas="e-/etc/hosts">/etc/hosts</primary></indexterm>
|
<title>Creating the /etc/hosts File</title>
|
||||||
|
|
||||||
|
<indexterm zone="ch-scripts-hosts">
|
||||||
|
<primary sortas="e-/etc/hosts">/etc/hosts</primary>
|
||||||
|
</indexterm>
|
||||||
|
|
||||||
<indexterm zone="ch-scripts-hosts">
|
<indexterm zone="ch-scripts-hosts">
|
||||||
<primary sortas="d-localnet">localnet</primary>
|
<primary sortas="d-localnet">localnet</primary>
|
||||||
@ -21,7 +26,7 @@
|
|||||||
FQDN, and possible aliases for use in the
|
FQDN, and possible aliases for use in the
|
||||||
<filename>/etc/hosts</filename> file. The syntax is:</para>
|
<filename>/etc/hosts</filename> file. The syntax is:</para>
|
||||||
|
|
||||||
<screen><IP address> myhost.example.org aliases</screen>
|
<screen><literal><IP address> myhost.example.org aliases</literal></screen>
|
||||||
|
|
||||||
<para>Unless the computer is to be visible to the Internet (i.e.,
|
<para>Unless the computer is to be visible to the Internet (i.e.,
|
||||||
there is a registered domain and a valid block of assigned IP
|
there is a registered domain and a valid block of assigned IP
|
||||||
@ -29,10 +34,10 @@ addresses—most users do not have this), make sure that the IP
|
|||||||
address is in the private network IP address range. Valid ranges
|
address is in the private network IP address range. Valid ranges
|
||||||
are:</para>
|
are:</para>
|
||||||
|
|
||||||
<screen> Class Networks
|
<screen><literal> Class Networks
|
||||||
A 10.0.0.0
|
A 10.0.0.0
|
||||||
B 172.16.0.0 through 172.31.0.255
|
B 172.16.0.0 through 172.31.0.255
|
||||||
C 192.168.0.0 through 192.168.255.255</screen>
|
C 192.168.0.0 through 192.168.255.255</literal></screen>
|
||||||
|
|
||||||
<para>A valid IP address could be 192.168.1.1. A valid FQDN for this
|
<para>A valid IP address could be 192.168.1.1. A valid FQDN for this
|
||||||
IP could be www.linuxfromscratch.org (not recommended because this is
|
IP could be www.linuxfromscratch.org (not recommended because this is
|
||||||
@ -71,4 +76,3 @@ machine will be connected to an existing network).</para>
|
|||||||
EOF</userinput></screen>
|
EOF</userinput></screen>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||||
%general-entities;
|
%general-entities;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<sect1 id="ch-scripts-inputrc">
|
<sect1 id="ch-scripts-inputrc">
|
||||||
<title>Creating the /etc/inputrc File</title>
|
|
||||||
<?dbhtml filename="inputrc.html"?>
|
<?dbhtml filename="inputrc.html"?>
|
||||||
|
|
||||||
<indexterm zone="ch-scripts-inputrc"><primary sortas="e-/etc/inputrc">/etc/inputrc</primary></indexterm>
|
<title>Creating the /etc/inputrc File</title>
|
||||||
|
|
||||||
|
<indexterm zone="ch-scripts-inputrc">
|
||||||
|
<primary sortas="e-/etc/inputrc">/etc/inputrc</primary>
|
||||||
|
</indexterm>
|
||||||
|
|
||||||
<para>The <filename>inputrc</filename> file handles keyboard mapping for
|
<para>The <filename>inputrc</filename> file handles keyboard mapping for
|
||||||
specific situations. This file is the startup file used by Readline — the
|
specific situations. This file is the startup file used by Readline — the
|
||||||
@ -19,9 +24,10 @@ logs in. If you later decide you need to override the defaults on a per-user
|
|||||||
basis, you can create a <filename>.inputrc</filename> file in the user's home
|
basis, you can create a <filename>.inputrc</filename> file in the user's home
|
||||||
directory with the modified mappings.</para>
|
directory with the modified mappings.</para>
|
||||||
|
|
||||||
<para>For more information on how to edit the <filename>inputrc</filename> file,
|
<para>For more information on how to edit the <filename>inputrc</filename>
|
||||||
see <command>info bash</command> under the <emphasis>Readline Init File</emphasis>
|
file, see <command>info bash</command> under the <emphasis>Readline Init
|
||||||
section. <command>info readline</command> is also a good source of information.</para>
|
File</emphasis> section. <command>info readline</command> is also a good
|
||||||
|
source of information.</para>
|
||||||
|
|
||||||
<para>Below is a generic global <filename>inputrc</filename> along with comments
|
<para>Below is a generic global <filename>inputrc</filename> along with comments
|
||||||
to explain what the various options do. Note that comments cannot be on the same
|
to explain what the various options do. Note that comments cannot be on the same
|
||||||
@ -74,4 +80,3 @@ set bell-style none
|
|||||||
EOF</userinput></screen>
|
EOF</userinput></screen>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
@ -1,21 +1,23 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||||
%general-entities;
|
%general-entities;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<sect1 id="ch-scripts-introduction">
|
<sect1 id="ch-scripts-introduction">
|
||||||
<title>Introduction</title>
|
|
||||||
<?dbhtml filename="introduction.html"?>
|
<?dbhtml filename="introduction.html"?>
|
||||||
|
|
||||||
|
<title>Introduction</title>
|
||||||
|
|
||||||
<para>This chapter details how to install and configure the LFS-Bootscripts
|
<para>This chapter details how to install and configure the LFS-Bootscripts
|
||||||
package. Most of these scripts will work without modification, but a few require
|
package. Most of these scripts will work without modification, but a few require
|
||||||
additional configuration files because they deal with hardware-dependent
|
additional configuration files because they deal with hardware-dependent
|
||||||
information.</para>
|
information.</para>
|
||||||
|
|
||||||
<para>System-V style init scripts are employed in this book because they are
|
<para>System-V style init scripts are employed in this book because they are
|
||||||
widely used. For additional options, a hint detailing the BSD style
|
widely used. For additional options, a hint detailing the BSD style init setup
|
||||||
init setup is available at
|
is available at <ulink
|
||||||
<ulink
|
|
||||||
url="http://www.linuxfromscratch.org/hints/downloads/files/bsd-init.txt"/>.
|
url="http://www.linuxfromscratch.org/hints/downloads/files/bsd-init.txt"/>.
|
||||||
Searching the LFS mailing lists for <quote>depinit</quote> will also offer
|
Searching the LFS mailing lists for <quote>depinit</quote> will also offer
|
||||||
additional choices.</para>
|
additional choices.</para>
|
||||||
@ -24,4 +26,3 @@ additional choices.</para>
|
|||||||
and move on to <xref linkend="chapter-bootable"/>.</para>
|
and move on to <xref linkend="chapter-bootable"/>.</para>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||||
%general-entities;
|
%general-entities;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<sect1 id="ch-scripts-network">
|
<sect1 id="ch-scripts-network">
|
||||||
<title>Configuring the network Script</title>
|
|
||||||
<?dbhtml filename="network.html"?>
|
<?dbhtml filename="network.html"?>
|
||||||
|
|
||||||
|
<title>Configuring the network Script</title>
|
||||||
|
|
||||||
<indexterm zone="ch-scripts-network">
|
<indexterm zone="ch-scripts-network">
|
||||||
<primary sortas="d-network">network</primary>
|
<primary sortas="d-network">network</primary>
|
||||||
<secondary>configuring</secondary></indexterm>
|
<secondary>configuring</secondary></indexterm>
|
||||||
@ -23,18 +26,17 @@ class="directory">/etc/rc.d/rc*.d</filename>).</para>
|
|||||||
<sect2>
|
<sect2>
|
||||||
<title>Creating Network Interface Configuration Files</title>
|
<title>Creating Network Interface Configuration Files</title>
|
||||||
|
|
||||||
<!-- Edit Me -->
|
|
||||||
<para>Which interfaces are brought up and down by the network script
|
<para>Which interfaces are brought up and down by the network script
|
||||||
depends on the files and directories in the <filename
|
depends on the files and directories in the <filename
|
||||||
class="directory">/etc/sysconfig/network-devices</filename> hierarchy.
|
class="directory">/etc/sysconfig/network-devices</filename> hierarchy.
|
||||||
This directory should contain a sub-directory for each interface to be configured,
|
This directory should contain a sub-directory for each interface to be
|
||||||
such as <filename>ifconfig.xyz</filename>, where <quote>xyz</quote> is a
|
configured, such as <filename>ifconfig.xyz</filename>, where
|
||||||
network interface name. Inside this directory would be files defining
|
<quote>xyz</quote> is a network interface name. Inside this directory
|
||||||
the attributes to this interface, such as its IP address(es), subnet
|
would be files defining the attributes to this interface, such as its IP
|
||||||
masks, and so forth.</para>
|
address(es), subnet masks, and so forth.</para>
|
||||||
|
|
||||||
<para>The following command creates a sample <filename>ipv4</filename> file for
|
<para>The following command creates a sample <filename>ipv4</filename>
|
||||||
the <emphasis>eth0</emphasis> device:</para>
|
file for the <emphasis>eth0</emphasis> device:</para>
|
||||||
|
|
||||||
<screen><userinput>cd /etc/sysconfig/network-devices &&
|
<screen><userinput>cd /etc/sysconfig/network-devices &&
|
||||||
mkdir -v ifconfig.eth0 &&
|
mkdir -v ifconfig.eth0 &&
|
||||||
@ -47,37 +49,42 @@ PREFIX=24
|
|||||||
BROADCAST=192.168.1.255</literal>
|
BROADCAST=192.168.1.255</literal>
|
||||||
EOF</userinput></screen>
|
EOF</userinput></screen>
|
||||||
|
|
||||||
<para>The values of these variables must be changed in every file to match the
|
<para>The values of these variables must be changed in every file to match
|
||||||
proper setup. If the <envar>ONBOOT</envar> variable is set to <quote>yes</quote>
|
the proper setup. If the <envar>ONBOOT</envar> variable is set to
|
||||||
the network script will bring up the Network Interface Card (NIC) during booting
|
<quote>yes</quote> the network script will bring up the Network Interface
|
||||||
of the system. If set to anything but <quote>yes</quote> the NIC will be ignored
|
Card (NIC) during booting of the system. If set to anything but
|
||||||
by the network script and not be brought up.</para>
|
<quote>yes</quote> the NIC will be ignored by the network script and not
|
||||||
|
be brought up.</para>
|
||||||
|
|
||||||
<para>The <envar>SERVICE</envar> variable defines the method used for obtaining
|
<para>The <envar>SERVICE</envar> variable defines the method used for
|
||||||
the IP address. The LFS-Bootscripts package has a modular IP assignment format,
|
obtaining the IP address. The LFS-Bootscripts package has a modular IP
|
||||||
and creating additional files in the <filename
|
assignment format, and creating additional files in the <filename
|
||||||
class="directory">/etc/sysconfig/network-devices/services</filename> directory
|
class="directory">/etc/sysconfig/network-devices/services</filename>
|
||||||
allows other IP assignment methods. This is commonly used for Dynamic Host
|
directory allows other IP assignment methods. This is commonly used for
|
||||||
Configuration Protocol (DHCP), which is addressed in the BLFS book.</para>
|
Dynamic Host Configuration Protocol (DHCP), which is addressed in the
|
||||||
|
BLFS book.</para>
|
||||||
|
|
||||||
<para>The <envar>GATEWAY</envar> variable should contain
|
<para>The <envar>GATEWAY</envar> variable should contain the default
|
||||||
the default gateway IP address, if one is present. If not, then comment out
|
gateway IP address, if one is present. If not, then comment out the
|
||||||
the variable entirely.</para>
|
variable entirely.</para>
|
||||||
|
|
||||||
<para>The <envar>PREFIX</envar> variable needs to contain the number of bits
|
<para>The <envar>PREFIX</envar> variable needs to contain the number of
|
||||||
used in the subnet. Each octet in an IP address is 8 bits. If the subnet's
|
bits used in the subnet. Each octet in an IP address is 8 bits. If the
|
||||||
netmask is 255.255.255.0, then it is using the first three octets (24 bits) to
|
subnet's netmask is 255.255.255.0, then it is using the first three octets
|
||||||
specify the network number. If the netmask is 255.255.255.240, it would be using
|
(24 bits) to specify the network number. If the netmask is 255.255.255.240,
|
||||||
the first 28 bits. Prefixes longer than 24 bits are commonly used by DSL and
|
it would be using the first 28 bits. Prefixes longer than 24 bits are
|
||||||
cable-based Internet Service Providers (ISPs). In this example (PREFIX=24), the
|
commonly used by DSL and cable-based Internet Service Providers (ISPs).
|
||||||
netmask is 255.255.255.0. Adjust the <envar>PREFIX</envar> variable according to
|
In this example (PREFIX=24), the netmask is 255.255.255.0. Adjust the
|
||||||
your specific subnet.</para>
|
<envar>PREFIX</envar> variable according to your specific subnet.</para>
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2 id="resolv.conf">
|
<sect2 id="resolv.conf">
|
||||||
<title>Creating the /etc/resolv.conf File</title>
|
<title>Creating the /etc/resolv.conf File</title>
|
||||||
<indexterm zone="resolv.conf"><primary sortas="e-/etc/resolv.conf">/etc/resolv.conf</primary></indexterm>
|
|
||||||
|
<indexterm zone="resolv.conf">
|
||||||
|
<primary sortas="e-/etc/resolv.conf">/etc/resolv.conf</primary>
|
||||||
|
</indexterm>
|
||||||
|
|
||||||
<para>If the system is going to be connected to the Internet, it will
|
<para>If the system is going to be connected to the Internet, it will
|
||||||
need some means of Domain Name Service (DNS) name resolution to
|
need some means of Domain Name Service (DNS) name resolution to
|
||||||
@ -97,14 +104,13 @@ nameserver <replaceable>[IP address of your secondary nameserver]</replaceable>
|
|||||||
# End /etc/resolv.conf</literal>
|
# End /etc/resolv.conf</literal>
|
||||||
EOF</userinput></screen>
|
EOF</userinput></screen>
|
||||||
|
|
||||||
<para>Replace <replaceable>[IP address of the
|
<para>Replace <replaceable>[IP address of the nameserver]</replaceable>
|
||||||
nameserver]</replaceable> with the IP address of the DNS most
|
with the IP address of the DNS most appropriate for the setup. There will
|
||||||
appropriate for the setup. There will often be more than one entry
|
often be more than one entry (requirements demand secondary servers for
|
||||||
(requirements demand secondary servers for fallback capability). If
|
fallback capability). If you only need or want one DNS server, remove the
|
||||||
you only need or want one DNS server, remove the second
|
second <emphasis>nameserver</emphasis> line from the file. The IP address
|
||||||
<emphasis>nameserver</emphasis> line from the file. The IP address may
|
may also be a router on the local network.</para>
|
||||||
also be a router on the local network.</para>
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
@ -1,31 +1,34 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||||
%general-entities;
|
%general-entities;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<sect1 id="ch-scripts-profile">
|
<sect1 id="ch-scripts-profile">
|
||||||
<title>The Bash Shell Startup Files</title>
|
|
||||||
<?dbhtml filename="profile.html"?>
|
<?dbhtml filename="profile.html"?>
|
||||||
|
|
||||||
<indexterm zone="ch-scripts-profile"><primary sortas="e-/etc/profile">/etc/profile</primary></indexterm>
|
<title>The Bash Shell Startup Files</title>
|
||||||
|
|
||||||
<para>The shell program <command>/bin/bash</command> (hereafter
|
<indexterm zone="ch-scripts-profile">
|
||||||
referred to as <quote>the shell</quote>) uses a collection of startup
|
<primary sortas="e-/etc/profile">/etc/profile</primary>
|
||||||
files to help create an environment to run in. Each file has a
|
</indexterm>
|
||||||
specific use and may affect login and interactive environments
|
|
||||||
differently. The files in the <filename
|
|
||||||
class="directory">/etc</filename> directory provide global settings.
|
|
||||||
If an equivalent file exists in the home directory, it may override
|
|
||||||
the global settings.</para>
|
|
||||||
|
|
||||||
<para>An interactive login shell is started after a successful login,
|
<para>The shell program <command>/bin/bash</command> (hereafter referred to
|
||||||
using <command>/bin/login</command>, by reading the
|
as <quote>the shell</quote>) uses a collection of startup files to help
|
||||||
<filename>/etc/passwd</filename> file. An interactive non-login shell
|
create an environment to run in. Each file has a specific use and may affect
|
||||||
is started at the command-line (e.g.,
|
login and interactive environments differently. The files in the <filename
|
||||||
<prompt>[prompt]$</prompt><command>/bin/bash</command>). A
|
class="directory">/etc</filename> directory provide global settings. If an
|
||||||
non-interactive shell is usually present when a shell script is
|
equivalent file exists in the home directory, it may override the global
|
||||||
running. It is non-interactive because it is processing a script and
|
settings.</para>
|
||||||
not waiting for user input between commands.</para>
|
|
||||||
|
<para>An interactive login shell is started after a successful login, using
|
||||||
|
<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.,
|
||||||
|
<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
|
||||||
|
commands.</para>
|
||||||
|
|
||||||
<para>For more information, see <command>info bash</command> under the
|
<para>For more information, see <command>info bash</command> under the
|
||||||
<emphasis>Bash Startup Files and Interactive Shells</emphasis> section.</para>
|
<emphasis>Bash Startup Files and Interactive Shells</emphasis> section.</para>
|
||||||
@ -39,49 +42,54 @@ environment variables necessary for native language support. Setting
|
|||||||
them properly results in:</para>
|
them properly results in:</para>
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>The output of programs translated into the native
|
<listitem>
|
||||||
language</para></listitem>
|
<para>The output of programs translated into the native language</para>
|
||||||
<listitem><para>Correct classification of characters into letters, digits and
|
</listitem>
|
||||||
other classes. This is necessary for <command>bash</command> to properly accept
|
<listitem>
|
||||||
non-ASCII characters in command lines in non-English locales</para></listitem>
|
<para>Correct classification of characters into letters, digits and other
|
||||||
<listitem><para>The correct alphabetical sorting order for the
|
classes. This is necessary for <command>bash</command> to properly accept
|
||||||
country</para></listitem>
|
non-ASCII characters in command lines in non-English locales</para>
|
||||||
<listitem><para>Appropriate default paper size</para></listitem>
|
</listitem>
|
||||||
<listitem><para>Correct formatting of monetary, time, and date
|
<listitem>
|
||||||
values</para></listitem>
|
<para>The correct alphabetical sorting order for the country</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>Appropriate default paper size</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>Correct formatting of monetary, time, and date values</para>
|
||||||
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
<para>This script also sets the <envar>INPUTRC</envar> environment variable that
|
<para>This script also sets the <envar>INPUTRC</envar> environment variable that
|
||||||
makes Bash and Readline use the <filename>/etc/inputrc</filename> file created
|
makes Bash and Readline use the <filename>/etc/inputrc</filename> file created
|
||||||
earlier.</para>
|
earlier.</para>
|
||||||
|
|
||||||
<para>Replace <replaceable>[ll]</replaceable> below with the
|
<para>Replace <replaceable>[ll]</replaceable> below with the two-letter code
|
||||||
two-letter code for the desired language (e.g., <quote>en</quote>) and
|
for the desired language (e.g., <quote>en</quote>) and
|
||||||
<replaceable>[CC]</replaceable> with the two-letter code for the
|
<replaceable>[CC]</replaceable> with the two-letter code for the appropriate
|
||||||
appropriate country (e.g., <quote>GB</quote>).
|
country (e.g., <quote>GB</quote>). <replaceable>[charmap]</replaceable> should
|
||||||
<replaceable>[charmap]</replaceable> should be replaced with the
|
be replaced with the canonical charmap for your chosen locale.</para>
|
||||||
canonical charmap for your chosen locale.</para>
|
|
||||||
|
|
||||||
<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>
|
the following command:</para>
|
||||||
|
|
||||||
<screen role="nodump"><userinput>locale -a</userinput></screen>
|
<screen role="nodump"><userinput>locale -a</userinput></screen>
|
||||||
|
|
||||||
<para>Locales can have a number of synonyms, e.g. <quote>ISO-8859-1</quote> is
|
<para>Locales can have a number of synonyms, e.g. <quote>ISO-8859-1</quote>
|
||||||
also referred to as <quote>iso8859-1</quote> and <quote>iso88591</quote>.
|
is also referred to as <quote>iso8859-1</quote> and <quote>iso88591</quote>.
|
||||||
Some applications cannot handle the various synonyms correctly, so it is safest
|
Some applications cannot handle the various synonyms correctly, so it is
|
||||||
to choose the canonical name for a particular locale. To determine the
|
safest to choose the canonical name for a particular locale. To determine
|
||||||
canonical name, run the following command, where
|
the canonical name, run the following command, where <replaceable>[locale
|
||||||
<replaceable>[locale name]</replaceable> is the output given by
|
name]</replaceable> is the output given by <command>locale -a</command> for
|
||||||
<command>locale -a</command> for your preferred locale
|
your preferred locale (<quote>en_GB.iso88591</quote> in our example).</para>
|
||||||
(<quote>en_GB.iso88591</quote> in our example).</para>
|
|
||||||
|
|
||||||
<screen role="nodump"><userinput>LC_ALL=<replaceable>[locale name]</replaceable> locale charmap</userinput></screen>
|
<screen role="nodump"><userinput>LC_ALL=<replaceable>[locale name]</replaceable> locale charmap</userinput></screen>
|
||||||
|
|
||||||
<para>For the <quote>en_GB.iso88591</quote> locale, the above command
|
<para>For the <quote>en_GB.iso88591</quote> locale, the above command
|
||||||
will print:</para>
|
will print:</para>
|
||||||
|
|
||||||
<screen>ISO-8859-1</screen>
|
<screen><computeroutput>ISO-8859-1</computeroutput></screen>
|
||||||
|
|
||||||
<para>This results in a final locale setting of <quote>en_GB.ISO-8859-1</quote>.
|
<para>This results in a final locale setting of <quote>en_GB.ISO-8859-1</quote>.
|
||||||
It is important that the locale found using the heuristic above is tested prior
|
It is important that the locale found using the heuristic above is tested prior
|
||||||
@ -102,9 +110,10 @@ the default installation of Glibc.</para>
|
|||||||
|
|
||||||
<screen><computeroutput>locale: Cannot set LC_* to default locale: No such file or directory</computeroutput></screen>
|
<screen><computeroutput>locale: Cannot set LC_* to default locale: No such file or directory</computeroutput></screen>
|
||||||
|
|
||||||
<para>If this happens, you should either install the desired locale using the <command>localedef</command> command, or consider choosing a different locale.
|
<para>If this happens, you should either install the desired locale using the
|
||||||
Further instructions assume that there are no such error messages from Glibc.
|
<command>localedef</command> command, or consider choosing a different locale.
|
||||||
</para>
|
Further instructions assume that there are no such error messages from
|
||||||
|
Glibc.</para>
|
||||||
|
|
||||||
<para>Some packages beyond LFS may also lack support for your chosen locale. One
|
<para>Some packages beyond LFS may also lack support for your chosen locale. One
|
||||||
example is the X library (part of the X Window System), which outputs the
|
example is the X library (part of the X Window System), which outputs the
|
||||||
@ -136,18 +145,17 @@ export INPUTRC=/etc/inputrc
|
|||||||
# End /etc/profile</literal>
|
# End /etc/profile</literal>
|
||||||
EOF</userinput></screen>
|
EOF</userinput></screen>
|
||||||
|
|
||||||
<note><para>The <quote>C</quote> (default) and <quote>en_US</quote>
|
<note>
|
||||||
(the recommended one for United States English users) locales are
|
<para>The <quote>C</quote> (default) and <quote>en_US</quote> (the
|
||||||
different.</para></note>
|
recommended one for United States English users) locales are different.</para>
|
||||||
|
</note>
|
||||||
|
|
||||||
<para>Setting the keyboard layout, screen font, and
|
<para>Setting the keyboard layout, screen font, and locale-related environment
|
||||||
locale-related environment variables are the only internationalization
|
variables are the only internationalization steps needed to support locales
|
||||||
steps needed to support locales that use ordinary single-byte
|
that use ordinary single-byte encodings and left-to-right writing direction.
|
||||||
encodings and left-to-right writing direction. More complex cases
|
More complex cases (including UTF-8 based locales) require additional steps
|
||||||
(including UTF-8 based locales) require additional steps and
|
and additional patches because many applications tend to not work properly
|
||||||
additional patches because many applications tend to not work properly
|
under such conditions. These steps and patches are not included in the LFS
|
||||||
under such conditions. These steps and patches are not included in
|
book and such locales are not yet supported by LFS.</para>
|
||||||
the LFS book and such locales are not yet supported by LFS.</para>
|
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||||
%general-entities;
|
%general-entities;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<sect1 id="ch-scripts-setclock">
|
<sect1 id="ch-scripts-setclock">
|
||||||
<title>Configuring the setclock Script</title>
|
|
||||||
<?dbhtml filename="setclock.html"?>
|
<?dbhtml filename="setclock.html"?>
|
||||||
|
|
||||||
|
<title>Configuring the setclock Script</title>
|
||||||
|
|
||||||
<indexterm zone="ch-scripts-setclock">
|
<indexterm zone="ch-scripts-setclock">
|
||||||
<primary sortas="d-setclock">setclock</primary>
|
<primary sortas="d-setclock">setclock</primary>
|
||||||
<secondary>configuring</secondary></indexterm>
|
<secondary>configuring</secondary></indexterm>
|
||||||
@ -51,4 +54,3 @@ at <ulink url="&hints-root;time.txt"/>. It explains issues such as
|
|||||||
time zones, UTC, and the <envar>TZ</envar> environment variable.</para>
|
time zones, UTC, and the <envar>TZ</envar> environment variable.</para>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
@ -1,15 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||||
%general-entities;
|
%general-entities;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<sect1 id="ch-scripts-sysklogd">
|
<sect1 id="ch-scripts-sysklogd">
|
||||||
<title>Configuring the sysklogd script</title>
|
|
||||||
<?dbhtml filename="sysklogd.html"?>
|
<?dbhtml filename="sysklogd.html"?>
|
||||||
|
|
||||||
|
<title>Configuring the sysklogd script</title>
|
||||||
|
|
||||||
<indexterm zone="ch-scripts-sysklogd">
|
<indexterm zone="ch-scripts-sysklogd">
|
||||||
<primary sortas="d-sysklogd">sysklogd</primary>
|
<primary sortas="d-sysklogd">sysklogd</primary>
|
||||||
<secondary>configuring</secondary></indexterm>
|
<secondary>configuring</secondary>
|
||||||
|
</indexterm>
|
||||||
|
|
||||||
<para>The <filename>sysklogd</filename> script invokes the
|
<para>The <filename>sysklogd</filename> script invokes the
|
||||||
<command>syslogd</command> program with the <parameter>-m 0</parameter> option.
|
<command>syslogd</command> program with the <parameter>-m 0</parameter> option.
|
||||||
|
@ -1,15 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||||
%general-entities;
|
%general-entities;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<sect1 id="ch-scripts-udev">
|
<sect1 id="ch-scripts-udev">
|
||||||
<title>Device and Module Handling on an LFS System</title>
|
|
||||||
<?dbhtml filename="udev.html"?>
|
<?dbhtml filename="udev.html"?>
|
||||||
|
|
||||||
|
<title>Device and Module Handling on an LFS System</title>
|
||||||
|
|
||||||
<indexterm zone="ch-scripts-udev">
|
<indexterm zone="ch-scripts-udev">
|
||||||
<primary sortas="a-Udev">Udev</primary>
|
<primary sortas="a-Udev">Udev</primary>
|
||||||
<secondary>usage</secondary></indexterm>
|
<secondary>usage</secondary>
|
||||||
|
</indexterm>
|
||||||
|
|
||||||
<para>In <xref linkend="chapter-building-system"/>, we installed the Udev
|
<para>In <xref linkend="chapter-building-system"/>, we installed the Udev
|
||||||
package. Before we go into the details regarding how this works,
|
package. Before we go into the details regarding how this works,
|
||||||
@ -34,23 +38,22 @@ the memory that is used is negligible.</para>
|
|||||||
<title>History</title>
|
<title>History</title>
|
||||||
|
|
||||||
<para>In February 2000, a new filesystem called <systemitem
|
<para>In February 2000, a new filesystem called <systemitem
|
||||||
class="filesystem">devfs</systemitem> was merged into the 2.3.46
|
class="filesystem">devfs</systemitem> was merged into the 2.3.46 kernel
|
||||||
kernel and was made available during the 2.4 series of
|
and was made available during the 2.4 series of stable kernels. Although
|
||||||
stable kernels. Although it was present in the kernel source itself,
|
it was present in the kernel source itself, this method of creating devices
|
||||||
this method of creating devices dynamically never received
|
dynamically never received overwhelming support from the core kernel
|
||||||
overwhelming support from the core kernel developers.</para>
|
developers.</para>
|
||||||
|
|
||||||
<para>The main problem with the approach adopted by <systemitem
|
<para>The main problem with the approach adopted by <systemitem
|
||||||
class="filesystem">devfs</systemitem> was the way it handled
|
class="filesystem">devfs</systemitem> was the way it handled device
|
||||||
device detection, creation, and naming. The latter issue, that of
|
detection, creation, and naming. The latter issue, that of device node
|
||||||
device node naming, was perhaps the most critical. It is generally
|
naming, was perhaps the most critical. It is generally accepted that if
|
||||||
accepted that if device names are allowed to be configurable, then
|
device names are allowed to be configurable, then the device naming policy
|
||||||
the device naming policy should be up to a system administrator, not
|
should be up to a system administrator, not imposed on them by any
|
||||||
imposed on them by any particular developer(s). The <systemitem
|
particular developer(s). The <systemitem class="filesystem">devfs</systemitem>
|
||||||
class="filesystem">devfs</systemitem> file system also suffers from race
|
file system also suffers from race conditions that are inherent in its design
|
||||||
conditions that are inherent in its design and cannot be fixed
|
and cannot be fixed without a substantial revision to the kernel. It has also
|
||||||
without a substantial revision to the kernel. It has also been marked
|
been marked as deprecated due to a lack of recent maintenance.</para>
|
||||||
as deprecated due to a lack of recent maintenance.</para>
|
|
||||||
|
|
||||||
<para>With the development of the unstable 2.5 kernel tree, later released as
|
<para>With the development of the unstable 2.5 kernel tree, later released as
|
||||||
the 2.6 series of stable kernels, a new virtual filesystem called <systemitem
|
the 2.6 series of stable kernels, a new virtual filesystem called <systemitem
|
||||||
@ -68,50 +71,54 @@ realistic.</para>
|
|||||||
|
|
||||||
<para>The <systemitem class="filesystem">sysfs</systemitem> filesystem was
|
<para>The <systemitem class="filesystem">sysfs</systemitem> filesystem was
|
||||||
mentioned briefly above. One may wonder how <systemitem
|
mentioned briefly above. One may wonder how <systemitem
|
||||||
class="filesystem">sysfs</systemitem> knows about the devices present on a
|
class="filesystem">sysfs</systemitem> knows about the devices present on
|
||||||
system and what device numbers should be used for them. Drivers that have been
|
a system and what device numbers should be used for them. Drivers that have
|
||||||
compiled into the kernel directly register their objects with <systemitem
|
been compiled into the kernel directly register their objects with
|
||||||
class="filesystem">sysfs</systemitem> as they are detected by the kernel. For
|
<systemitem class="filesystem">sysfs</systemitem> as they are detected by
|
||||||
drivers compiled as modules, this registration will happen when the module is
|
the kernel. For drivers compiled as modules, this registration will happen
|
||||||
loaded. Once the <systemitem class="filesystem">sysfs</systemitem> filesystem is
|
when the module is loaded. Once the <systemitem
|
||||||
mounted (on <filename class="directory">/sys</filename>), data which the
|
class="filesystem">sysfs</systemitem> filesystem is mounted (on <filename
|
||||||
built-in drivers registered with <systemitem
|
class="directory">/sys</filename>), data which the built-in drivers
|
||||||
class="filesystem">sysfs</systemitem> are available to userspace processes and
|
registered with <systemitem class="filesystem">sysfs</systemitem> are
|
||||||
to <command>udev</command> for device node creation.</para>
|
available to userspace processes and to <command>udev</command> for device
|
||||||
|
node creation.</para>
|
||||||
|
|
||||||
<para>The <command>S10udev</command> initscript takes care of creating these
|
<para>The <command>S10udev</command> initscript takes care of creating
|
||||||
device nodes when Linux is booted. This script starts by registering
|
these device nodes when Linux is booted. This script starts by registering
|
||||||
<command>/sbin/udevsend</command> as a hotplug event handler. Hotplug events
|
<command>/sbin/udevsend</command> as a hotplug event handler. Hotplug events
|
||||||
(discussed below) are not usually generated during this stage, but
|
(discussed below) are not usually generated during this stage, but
|
||||||
<command>udev</command> is registered just in case they do occur. The
|
<command>udev</command> is registered just in case they do occur. The
|
||||||
<command>udevstart</command> program then walks through the <systemitem
|
<command>udevstart</command> program then walks through the <systemitem
|
||||||
class="filesystem">/sys</systemitem> filesystem and creates devices under
|
class="filesystem">/sys</systemitem> filesystem and creates devices under
|
||||||
<filename class="directory">/dev</filename> that match the descriptions. For
|
<filename class="directory">/dev</filename> that match the descriptions.
|
||||||
example, <filename>/sys/class/tty/vcs/dev</filename> contains the string
|
For example, <filename>/sys/class/tty/vcs/dev</filename> contains the
|
||||||
<quote>7:0</quote> This string is used by <command>udevstart</command> to create
|
string <quote>7:0</quote> This string is used by <command>udevstart</command>
|
||||||
<filename>/dev/vcs</filename> with major number <emphasis>7</emphasis> and minor
|
to create <filename>/dev/vcs</filename> with major number
|
||||||
<emphasis>0</emphasis>. The names and permissions of the nodes created under
|
<emphasis>7</emphasis> and minor <emphasis>0</emphasis>. The names and
|
||||||
the <filename class="directory">/dev</filename> directory are configured
|
permissions of the nodes created under the <filename
|
||||||
according to the rules specified in the files within the <filename
|
class="directory">/dev</filename> directory are configured according to the
|
||||||
class="directory">/etc/udev/rules.d/</filename> directory. These are numbered in
|
rules specified in the files within the <filename
|
||||||
a similar fashion to the LFS-Bootscripts package. If <command>udev</command>
|
class="directory">/etc/udev/rules.d/</filename> directory. These are
|
||||||
can't find a rule for the device it is creating, it will default permissions to
|
numbered in a similar fashion to the LFS-Bootscripts package. If
|
||||||
<emphasis>660</emphasis> and ownership to <emphasis>root:root</emphasis>.</para>
|
<command>udev</command> can't find a rule for the device it is creating,
|
||||||
|
it will default permissions to <emphasis>660</emphasis> and ownership to
|
||||||
|
<emphasis>root:root</emphasis>.</para>
|
||||||
|
|
||||||
<para>Once the above stage is complete, all devices that were already present
|
<para>Once the above stage is complete, all devices that were already present
|
||||||
and have compiled-in drivers will be available for use. This leads us to the
|
and have compiled-in drivers will be available for use. This leads us to the
|
||||||
devices that have modular drivers.</para>
|
devices that have modular drivers.</para>
|
||||||
|
|
||||||
<para>Earlier, we mentioned the concept of a <quote>hotplug event
|
<para>Earlier, we mentioned the concept of a <quote>hotplug event
|
||||||
handler.</quote> When a new device connection is detected by the kernel, the
|
handler.</quote> When a new device connection is detected by the kernel,
|
||||||
kernel will generate a hotplug event and look at the file
|
the kernel will generate a hotplug event and look at the file
|
||||||
<filename>/proc/sys/kernel/hotplug</filename> to determine the userspace program
|
<filename>/proc/sys/kernel/hotplug</filename> to determine the userspace
|
||||||
that handles the device's connection. The <command>udev</command> bootscript
|
program that handles the device's connection. The <command>udev</command>
|
||||||
registered <command>udevsend</command> as this handler. When these hotplug
|
bootscript registered <command>udevsend</command> as this handler. When
|
||||||
events are generated, the kernel will tell <command>udev</command> to check the
|
these hotplug events are generated, the kernel will tell
|
||||||
<filename class="directory">/sys</filename> filesystem for the information
|
<command>udev</command> to check the <filename
|
||||||
pertaining to this new device and create the <filename
|
class="directory">/sys</filename> filesystem for the information pertaining
|
||||||
class="directory">/dev</filename> entry for it.</para>
|
to this new device and create the <filename class="directory">/dev</filename>
|
||||||
|
entry for it.</para>
|
||||||
|
|
||||||
<para>This brings us to one problem that exists with <command>udev</command>,
|
<para>This brings us to one problem that exists with <command>udev</command>,
|
||||||
and likewise with <systemitem class="filesystem">devfs</systemitem> before it.
|
and likewise with <systemitem class="filesystem">devfs</systemitem> before it.
|
||||||
@ -127,27 +134,28 @@ LFS-Bootscripts package, along with the
|
|||||||
computer starts up. This allows <command>udev</command> to detect the devices
|
computer starts up. This allows <command>udev</command> to detect the devices
|
||||||
and create the appropriate device nodes.</para>
|
and create the appropriate device nodes.</para>
|
||||||
|
|
||||||
<para>Note that on slower machines or for drivers that create a lot
|
<para>Note that on slower machines or for drivers that create a lot of device
|
||||||
of device nodes, the process of creating devices may take a few
|
nodes, the process of creating devices may take a few seconds to complete.
|
||||||
seconds to complete. This means that some device nodes may not be
|
This means that some device nodes may not be immediately accessible.</para>
|
||||||
immediately accessible.</para>
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
<title>Handling Hotpluggable/Dynamic Devices</title>
|
<title>Handling Hotpluggable/Dynamic Devices</title>
|
||||||
|
|
||||||
<para>When you plug in a device, such as a Universal Serial Bus (USB) MP3 player, the kernel
|
<para>When you plug in a device, such as a Universal Serial Bus (USB) MP3
|
||||||
recognizes that the device is now connected and generates a hotplug
|
player, the kernel recognizes that the device is now connected and generates
|
||||||
event. If the driver is already loaded (either because it was compiled
|
a hotplug event. If the driver is already loaded (either because it was
|
||||||
into the kernel or because it was loaded via the
|
compiled into the kernel or because it was loaded via the
|
||||||
<command>S05modules</command> bootscript), <command>udev</command> will
|
<command>S05modules</command> bootscript), <command>udev</command> will be
|
||||||
be called upon to create the relevant device node(s) according to the
|
called upon to create the relevant device node(s) according to the
|
||||||
<systemitem class="filesystem">sysfs</systemitem> data available in
|
<systemitem class="filesystem">sysfs</systemitem> data available in
|
||||||
<filename class="directory">/sys</filename>.</para>
|
<filename class="directory">/sys</filename>.</para>
|
||||||
|
|
||||||
<para>If the driver for the just plugged in device is available as a module but
|
<para>If the driver for the just plugged in device is available as a module but
|
||||||
currently unloaded, the Hotplug package will load the appropriate module
|
currently unloaded, the Hotplug package will load the appropriate module
|
||||||
and make this device available by creating the device node(s) for it.</para>
|
and make this device available by creating the device node(s) for it.</para>
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
@ -159,12 +167,13 @@ device nodes:</para>
|
|||||||
<para>1) A kernel driver may not export its data to <systemitem
|
<para>1) A kernel driver may not export its data to <systemitem
|
||||||
class="filesystem">sysfs</systemitem>.</para>
|
class="filesystem">sysfs</systemitem>.</para>
|
||||||
|
|
||||||
<para>This is most common with third party drivers from outside the kernel tree.
|
<para>This is most common with third party drivers from outside the kernel
|
||||||
Udev will be unable to automatically create device nodes for such drivers. Use
|
tree. Udev will be unable to automatically create device nodes for such
|
||||||
the <filename>/etc/sysconfig/createfiles</filename> configuration file to
|
drivers. Use the <filename>/etc/sysconfig/createfiles</filename>
|
||||||
manually create the devices. Consult the <filename>devices.txt</filename> file
|
configuration file to manually create the devices. Consult the
|
||||||
inside the kernel documentation or the documentation for that driver to find the
|
<filename>devices.txt</filename> file inside the kernel documentation or
|
||||||
proper major/minor numbers.</para>
|
the documentation for that driver to find the proper major/minor
|
||||||
|
numbers.</para>
|
||||||
|
|
||||||
<para>2) A non-hardware device is required. This is most common with
|
<para>2) A non-hardware device is required. This is most common with
|
||||||
the Advanced Linux Sound Architecture (ALSA) project's Open Sound
|
the Advanced Linux Sound Architecture (ALSA) project's Open Sound
|
||||||
@ -173,13 +182,17 @@ handled in one of two ways:</para>
|
|||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
|
|
||||||
<listitem><para>Adding the module names to
|
<listitem>
|
||||||
<filename>/etc/sysconfig/modules</filename></para></listitem>
|
<para>Adding the module names to
|
||||||
<listitem><para>Using an
|
<filename>/etc/sysconfig/modules</filename></para>
|
||||||
<quote>install</quote> line in
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>Using an <quote>install</quote> line in
|
||||||
<filename>/etc/modprobe.conf</filename>. This tells the
|
<filename>/etc/modprobe.conf</filename>. This tells the
|
||||||
<command>modprobe</command> command <quote>when loading this module,
|
<command>modprobe</command> command <quote>when loading this module,
|
||||||
also load this other module, at the same time.</quote> For example:</para>
|
also load this other module, at the same time.</quote>
|
||||||
|
For example:</para>
|
||||||
|
|
||||||
<screen role="nodump"><userinput>install snd-pcm modprobe -i snd-pcm ; modprobe \
|
<screen role="nodump"><userinput>install snd-pcm modprobe -i snd-pcm ; modprobe \
|
||||||
snd-pcm-oss ; true</userinput></screen>
|
snd-pcm-oss ; true</userinput></screen>
|
||||||
@ -187,8 +200,11 @@ also load this other module, at the same time.</quote> For example:</para>
|
|||||||
<para>This will cause the system to load both the
|
<para>This will cause the system to load both the
|
||||||
<emphasis>snd-pcm</emphasis> and <emphasis>snd-pcm-oss</emphasis>
|
<emphasis>snd-pcm</emphasis> and <emphasis>snd-pcm-oss</emphasis>
|
||||||
modules when any request is made to load the driver
|
modules when any request is made to load the driver
|
||||||
<emphasis>snd-pcm</emphasis>.</para></listitem>
|
<emphasis>snd-pcm</emphasis>.</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
@ -198,16 +214,24 @@ modules when any request is made to load the driver
|
|||||||
sites:</para>
|
sites:</para>
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>A Userspace Implementation of <systemitem class="filesystem">devfs</systemitem>
|
|
||||||
<ulink url="http://www.kroah.com/linux/talks/ols_2003_udev_paper/Reprint-Kroah-Hartman-OLS2003.pdf"/></para></listitem>
|
|
||||||
|
|
||||||
<listitem><para>udev FAQ
|
<listitem>
|
||||||
<ulink url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-FAQ"/></para></listitem>
|
<para>A Userspace Implementation of <systemitem class="filesystem">devfs</systemitem>
|
||||||
|
<ulink url="http://www.kroah.com/linux/talks/ols_2003_udev_paper/Reprint-Kroah-Hartman-OLS2003.pdf"/></para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>udev FAQ
|
||||||
|
<ulink url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-FAQ"/></para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>The Linux Kernel Driver Model
|
||||||
|
<ulink url="http://public.planetmirror.com/pub/lca/2003/proceedings/papers/Patrick_Mochel/Patrick_Mochel.pdf"/></para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
<listitem><para>The Linux Kernel Driver Model
|
|
||||||
<ulink url="http://public.planetmirror.com/pub/lca/2003/proceedings/papers/Patrick_Mochel/Patrick_Mochel.pdf"/></para></listitem>
|
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
@ -1,15 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||||
%general-entities;
|
%general-entities;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<sect1 id="ch-scripts-usage">
|
<sect1 id="ch-scripts-usage">
|
||||||
<title>How Do These Bootscripts Work?</title>
|
|
||||||
<?dbhtml filename="usage.html"?>
|
<?dbhtml filename="usage.html"?>
|
||||||
|
|
||||||
|
<title>How Do These Bootscripts Work?</title>
|
||||||
|
|
||||||
<indexterm zone="ch-scripts-usage">
|
<indexterm zone="ch-scripts-usage">
|
||||||
<primary sortas="a-Bootscripts">Bootscripts</primary>
|
<primary sortas="a-Bootscripts">Bootscripts</primary>
|
||||||
<secondary>usage</secondary></indexterm>
|
<secondary>usage</secondary>
|
||||||
|
</indexterm>
|
||||||
|
|
||||||
<para>Linux uses a special booting facility named SysVinit that is based on a
|
<para>Linux uses a special booting facility named SysVinit that is based on a
|
||||||
concept of <emphasis>run-levels</emphasis>. It can be quite different from one
|
concept of <emphasis>run-levels</emphasis>. It can be quite different from one
|
||||||
@ -20,10 +24,10 @@ own way of doing things, but it respects generally accepted standards.</para>
|
|||||||
<para>SysVinit (which will be referred to as <quote>init</quote> from now on)
|
<para>SysVinit (which will be referred to as <quote>init</quote> from now on)
|
||||||
works using a run-levels scheme. There are seven (numbered 0 to 6) run-levels
|
works using a run-levels scheme. There are seven (numbered 0 to 6) run-levels
|
||||||
(actually, there are more run-levels, but they are for special cases and are
|
(actually, there are more run-levels, but they are for special cases and are
|
||||||
generally not used. See <filename>init(8)</filename> for more details), and each one
|
generally not used. See <filename>init(8)</filename> for more details), and
|
||||||
of those corresponds to the actions the computer is supposed to perform when it
|
each one of those corresponds to the actions the computer is supposed to
|
||||||
starts up. The default run-level is 3. Here are the descriptions of the
|
perform when it starts up. The default run-level is 3. Here are the
|
||||||
different run-levels as they are implemented:</para>
|
descriptions of the different run-levels as they are implemented:</para>
|
||||||
|
|
||||||
<literallayout>0: halt the computer
|
<literallayout>0: halt the computer
|
||||||
1: single-user mode
|
1: single-user mode
|
||||||
@ -54,17 +58,16 @@ to 99—the lower the number the earlier it gets executed. When
|
|||||||
are either started or stopped, depending on the runlevel chosen.</para>
|
are either started or stopped, depending on the runlevel chosen.</para>
|
||||||
|
|
||||||
<para>The real scripts are in <filename
|
<para>The real scripts are in <filename
|
||||||
class="directory">/etc/rc.d/init.d</filename>. They do the actual
|
class="directory">/etc/rc.d/init.d</filename>. They do the actual work, and
|
||||||
work, and the symlinks all point to them. Killing links and starting
|
the symlinks all point to them. Killing links and starting links point to
|
||||||
links point to the same script in <filename
|
the same script in <filename class="directory">/etc/rc.d/init.d</filename>.
|
||||||
class="directory">/etc/rc.d/init.d</filename>. This is because the
|
This is because the scripts can be called with different parameters like
|
||||||
scripts can be called with different parameters like
|
|
||||||
<parameter>start</parameter>, <parameter>stop</parameter>,
|
<parameter>start</parameter>, <parameter>stop</parameter>,
|
||||||
<parameter>restart</parameter>, <parameter>reload</parameter>, and
|
<parameter>restart</parameter>, <parameter>reload</parameter>, and
|
||||||
<parameter>status</parameter>. When a K link is encountered, the
|
<parameter>status</parameter>. When a K link is encountered, the appropriate
|
||||||
appropriate script is run with the <parameter>stop</parameter>
|
script is run with the <parameter>stop</parameter> argument. When an S link
|
||||||
argument. When an S link is encountered, the appropriate script is run
|
is encountered, the appropriate script is run with the
|
||||||
with the <parameter>start</parameter> argument.</para>
|
<parameter>start</parameter> argument.</para>
|
||||||
|
|
||||||
<para>There is one exception to this explanation. Links that start
|
<para>There is one exception to this explanation. Links that start
|
||||||
with an <emphasis>S</emphasis> in the <filename
|
with an <emphasis>S</emphasis> in the <filename
|
||||||
@ -79,32 +82,44 @@ needs to be started. The system only needs to be stopped.</para>
|
|||||||
do:</para>
|
do:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><parameter>start</parameter></term>
|
<term><parameter>start</parameter></term>
|
||||||
<listitem><para>The service is started.</para></listitem>
|
<listitem>
|
||||||
|
<para>The service is started.</para>
|
||||||
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><parameter>stop</parameter></term>
|
<term><parameter>stop</parameter></term>
|
||||||
<listitem><para>The service is stopped.</para></listitem>
|
<listitem>
|
||||||
|
<para>The service is stopped.</para>
|
||||||
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><parameter>restart</parameter></term>
|
<term><parameter>restart</parameter></term>
|
||||||
<listitem><para>The service is stopped and then started again.</para></listitem>
|
<listitem>
|
||||||
|
<para>The service is stopped and then started again.</para>
|
||||||
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><parameter>reload</parameter></term>
|
<term><parameter>reload</parameter></term>
|
||||||
<listitem><para>The configuration of the service is updated.
|
<listitem>
|
||||||
|
<para>The configuration of the service is updated.
|
||||||
This is used after the configuration file of a service was modified, when
|
This is used after the configuration file of a service was modified, when
|
||||||
the service does not need to be restarted.</para></listitem>
|
the service does not need to be restarted.</para>
|
||||||
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><parameter>status</parameter></term>
|
<term><parameter>status</parameter></term>
|
||||||
<listitem><para>Tells if the service is running and with which PIDs.</para></listitem>
|
<listitem>
|
||||||
|
<para>Tells if the service is running and with which PIDs.</para>
|
||||||
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
<para>Feel free to modify the way the boot process works (after all,
|
<para>Feel free to modify the way the boot process works (after all,
|
||||||
@ -112,4 +127,3 @@ it is your own LFS system). The files given here are an example of how
|
|||||||
it can be done.</para>
|
it can be done.</para>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user