Changeset b822811 for chapter07


Ignore:
Timestamp:
07/22/2001 07:45:10 PM (23 years ago)
Author:
Mark Hymers <markh@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 12.2, 12.2-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, v3_0, v3_1, v3_2, v3_3, v4_0, v4_1, v5_0, v5_1, v5_1_1, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/loongarch-12.2, xry111/mips64el, xry111/multilib, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
f1da843
Parents:
46f5461
Message:

XML changes

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

Location:
chapter07
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • chapter07/checkfs.xml

    r46f5461 rb822811  
    22<title>Creating the checkfs script</title>
    33
    4 <para>
    5 Create the <filename>/etc/init.d/checkfs</filename> script by running
    6 the following command:
    7 </para>
     4<para>Create the <filename>/etc/init.d/checkfs</filename> script by running
     5the following command:</para>
    86
    9 <para>
    10 <screen>
    11 <userinput>cat &gt; checkfs &lt;&lt; "EOF"</userinput>
     7<para><screen><userinput>cat &gt; checkfs &lt;&lt; "EOF"</userinput>
    128#!/bin/sh
    139# Begin /etc/init.d/checkfs
     
    109105
    110106# End /etc/init.d/checkfs
    111 <userinput>EOF</userinput>
    112 </screen>
    113 </para>
     107<userinput>EOF</userinput></screen></para>
    114108
    115109</sect1>
  • chapter07/createdirs.xml

    r46f5461 rb822811  
    22<title>Creating directories</title>
    33
    4 <para>
    5 We need to start by creating a few extra directories that are used by
    6 the boot scripts. These directories are created by running:
    7 </para>
     4<para>We need to start by creating a few extra directories that are used by
     5the boot scripts. These directories are created by running:</para>
    86
    9 <para>
    10 <screen>
    11 <userinput>cd /etc &amp;&amp;</userinput>
     7<para><screen><userinput>cd /etc &amp;&amp;</userinput>
    128<userinput>mkdir rc{0,1,2,3,4,5,6,S}.d init.d sysconfig &amp;&amp;</userinput>
    13 <userinput>cd init.d</userinput>
    14 </screen>
    15 </para>
     9<userinput>cd init.d</userinput></screen></para>
    1610
    1711</sect1>
  • chapter07/ethnet.xml

    r46f5461 rb822811  
    22<title>Creating the /etc/init.d/ethnet script</title>
    33
    4 <para>
    5 This section only applies if a user is going to configure a network card.
    6 If not, this section can be skipped.
    7 </para>
     4<para>This section only applies if a user is going to configure a network card.
     5If not, this section can be skipped.</para>
    86
    9 <para>
    10 Create the <filename>/etc/init.d/ethnet</filename> script by running the
    11 following command:
    12 </para>
     7<para>Create the <filename>/etc/init.d/ethnet</filename> script by running the
     8following command:</para>
    139
    14 <para>
    15 <screen>
    16 <userinput>cat &gt; /etc/init.d/ethnet &lt;&lt; "EOF"</userinput>
     10<para><screen><userinput>cat &gt; /etc/init.d/ethnet &lt;&lt; "EOF"</userinput>
    1711#!/bin/sh
    1812# Begin /etc/init.d/ethnet
     
    115109
    116110# End /etc/init.d/ethnet
    117 <userinput>EOF</userinput>
    118 </screen>
    119 </para>
     111<userinput>EOF</userinput></screen></para>
    120112
    121113<sect2>
    122114<title>Adding default gateway to /etc/sysconfig/network</title>
    123115
    124 <para>
    125 If a default gateway is required to be setup, the following command does that:
    126 </para>
     116<para>If a default gateway is required to be setup, the
     117following command does that:</para>
    127118
    128 <para>
    129 <screen>
    130 <userinput>cat &gt;&gt; /etc/sysconfig/network &lt;&lt; "EOF"</userinput>
     119<para><screen><userinput>cat &gt;&gt; /etc/sysconfig/network &lt;&lt; "EOF"</userinput>
    131120GATEWAY=192.168.1.2
    132121GATEWAY_IF=eth0
    133 <userinput>EOF</userinput>
    134 </screen>
    135 </para>
     122<userinput>EOF</userinput></screen></para>
    136123
    137 <para>
    138 GATEWAY and GATEWAY_IF need to be changed to match the network setup.
     124<para>GATEWAY and GATEWAY_IF need to be changed to match the network setup.
    139125GATEWAY contains the address of the default gateway, and GATEWAY_IF
    140126contains the network interface through which that default gateway can
    141 be reached.
    142 </para>
     127be reached.</para>
    143128
    144129</sect2>
     
    147132<title>Creating NIC configuration files</title>
    148133
    149 <para>
    150 Which interfaces are brought up and down by the ethnet script depends on
     134<para>Which interfaces are brought up and down by the ethnet script depends on
    151135the files in the /etc/sysconfig/nic-config directory. This
    152136directory should contain files in the form of ifcfg-x where x is an
    153 identification number (or whatever a user named it).
    154 </para>
     137identification number (or whatever a user named it).</para>
    155138
    156 <para>
    157 First the nic-config directory is created by running:
    158 </para>
     139<para>First the nic-config directory is created by running:</para>
    159140
    160 <para>
    161 <screen>
    162 <userinput>mkdir /etc/sysconfig/nic-config</userinput>
    163 </screen>
    164 </para>
     141<para><screen><userinput>mkdir
     142/etc/sysconfig/nic-config</userinput></screen></para>
    165143
    166 <para>
     144<para>Now, new files are created in that directory containing the following.
     145The following command creates a sample file ifcfg-eth0:</para>
    167146
    168 Now, new files are created in that directory containing the following.
    169 The following command creates a sample file ifcfg-eth0:
    170 </para>
    171 
    172 <para>
    173 <screen>
    174 <userinput>cat &gt; /etc/sysconfig/nic-config/ifcfg-eth0 &lt;&lt; "EOF"</userinput>
     147<para><screen><userinput>cat &gt; /etc/sysconfig/nic-config/ifcfg-eth0 &lt;&lt; "EOF"</userinput>
    175148ONBOOT=yes
    176149DEVICE=eth0
     
    178151NETMASK=255.255.255.0
    179152BROADCAST=192.168.1.255
    180 <userinput>EOF</userinput>
    181 </screen>
    182 </para>
     153<userinput>EOF</userinput></screen></para>
    183154
    184 <para>
    185 Of course, the values of those four variables have to be changed
     155<para>Of course, the values of those four variables have to be changed
    186156in every file to
    187157match the proper setup. Usually NETMASK and BROADCAST will remain the
     
    189159the ONBOOT variable is set to yes, the ethnet script will bring it up
    190160during boot up of the system. If set to anything else but yes it will be
    191 ignored by the ethnet script and thus not brought up.
    192 </para>
     161ignored by the ethnet script and thus not brought up.</para>
    193162
    194163</sect2>
  • chapter07/functions.xml

    r46f5461 rb822811  
    22<title>Creating the functions script</title>
    33
    4 <para>
    5 Create the <filename>/etc/init.d/functions</filename> script by running
    6 the following command:
    7 </para>
    8 
    9 <para>
    10 <screen>
    11 <userinput>cat &gt; functions &lt;&lt; "EOF"</userinput>
     4<para>Create the <filename>/etc/init.d/functions</filename> script by running
     5the following command:</para>
     6
     7<para><screen><userinput>cat &gt; functions &lt;&lt; "EOF"</userinput>
    128#!/bin/sh
    139# Begin /etc/init.d/functions
     
    504500
    505501# End /etc/init.d/functions
    506 <userinput>EOF</userinput>
    507 </screen>
    508 </para>
     502<userinput>EOF</userinput></screen></para>
    509503
    510504</sect1>
  • chapter07/halt.xml

    r46f5461 rb822811  
    22<title>Creating the halt script</title>
    33
    4 <para>
    5 Create the <filename>/etc/init.d/halt</filename> script by running the
    6 following command:
    7 </para>
     4<para>Create the <filename>/etc/init.d/halt</filename> script by running the
     5following command:</para>
    86
    9 <para>
    10 <screen>
    11 <userinput>cat &gt; halt &lt;&lt; "EOF"</userinput>
     7<para><screen><userinput>cat &gt; halt &lt;&lt; "EOF"</userinput>
    128#!/bin/sh
    139# Begin /etc/init.d/halt
     
    2016
    2117# End /etc/init.d/halt
    22 <userinput>EOF</userinput>
    23 </screen>
    24 </para>
     18<userinput>EOF</userinput></screen></para>
    2519
    2620</sect1>
  • chapter07/hosts.xml

    r46f5461 rb822811  
    22<title>Creating the /etc/hosts file</title>
    33
    4 <para>
    5 If a network card is to be configured, a user has to decide on the
     4<para>If a network card is to be configured, a user has to decide on the
    65IP-address, FQDN and possible aliases for use in the /etc/hosts file. An
    7 example is:
    8 </para>
     6example is:</para>
    97
    10 <para>
    11 <screen>
    12 &lt;my-IP&gt; myhost.mydomain.org aliases
    13 </screen>
    14 </para>
     8<para><screen>&lt;my-IP&gt; myhost.mydomain.org aliases</screen></para>
    159
    16 <para>
    17 It should made sure that the IP-address is in the private network
    18 IP-address range. Valid ranges are:
    19 </para>
     10<para>It should made sure that the IP-address is in the private network
     11IP-address range. Valid ranges are:</para>
    2012
    21 <para>
    22 <screen>
    23         Class Networks
     13<para><screen>  Class Networks
    2414        A     10.0.0.0
    2515        B     172.16.0.0 through 172.31.0.0
    26         C     192.168.0.0 through 192.168.255.0
    27 </screen>
    28 </para>
     16        C     192.168.0.0 through 192.168.255.0</screen></para>
    2917
    30 <para>
    31 A valid IP address could be 192.168.1.1. A valid FQDN for this IP could
    32 be www.linuxfromscratch.org
    33 </para>
     18<para>A valid IP address could be 192.168.1.1. A valid FQDN for this IP could
     19be www.linuxfromscratch.org</para>
    3420
    35 <para>
    36 If a user is not going to use a network card, he still needs to come up with a
    37 FQDN. This is necessary for programs like Sendmail to operate correctly (in
    38 fact; Sendmail won't run when it can't determine the FQDN).
    39 </para>
     21<para>If a user is not going to use a network card, he still needs to
     22come up with a FQDN. This is necessary for programs like Sendmail to operate
     23correctly (in fact; Sendmail won't run when it can't determine the FQDN).</para>
    4024
    41 <para>
    42 If a network card is not going to be configured, a new file
    43 <filename>/etc/hosts</filename> is created by running:
    44 </para>
     25<para>If a network card is not going to be configured, a new file
     26<filename>/etc/hosts</filename> is created by running:</para>
    4527
    46 <para>
    47 <screen>
    48 <userinput>cat &gt; /etc/hosts &lt;&lt; "EOF"</userinput>
     28<para><screen><userinput>cat &gt; /etc/hosts &lt;&lt; "EOF"</userinput>
    4929# Begin /etc/hosts (no network card version)
    5030
     
    5232
    5333# End /etc/hosts (no network card version)
    54 <userinput>EOF</userinput>
    55 </screen>
    56 </para>
     34<userinput>EOF</userinput></screen></para>
    5735
    58 <para>
    59 If a network card is to be configured, a new file
    60 <filename>/etc/hosts</filename> is created by running:
    61 </para>
     36<para>If a network card is to be configured, a new file
     37<filename>/etc/hosts</filename> is created by running:</para>
    6238
    63 <para>
    64 <screen>
    65 <userinput>cat &gt; /etc/hosts &lt;&lt; "EOF"</userinput>
     39<para><screen><userinput>cat &gt; /etc/hosts &lt;&lt; "EOF"</userinput>
    6640# Begin /etc/hosts (network card version)
    6741
     
    7044
    7145# End /etc/hosts (network card version)
    72 <userinput>EOF</userinput>
    73 </screen>
    74 </para>
     46<userinput>EOF</userinput></screen></para>
    7547
    76 <para>
    77 Of course, the 192.168.1.1 and www.mydomain.org have to be changed to the
     48<para>Of course, the 192.168.1.1 and www.mydomain.org have to be changed to the
    7849users
    7950liking (or requirements if assigned an IP-address by a network/system
    80 administrator and this machine is planned to be connected to that network).
    81 </para>
     51administrator and this machine is planned to be
     52connected to that network).</para>
    8253
    8354</sect1>
  • chapter07/introduction.xml

    r46f5461 rb822811  
    22<title>Introduction</title>
    33
    4 <para>
    5 This chapter will create the necessary scripts that are run at boot time.
     4<para>This chapter will create the necessary scripts that are run at boot time.
    65These scripts perform tasks such as remounting the root file system
    76mounted read-only by the kernel into read-write mode, activating the swap
    87partition(s), running a check on the root file system to make sure it's
    9 intact, setting up networking and starting the daemons that the system uses.
    10 </para>
     8intact, setting up networking and starting the daemons that the
     9system uses.</para>
    1110
    12 <para>
    13 We will be using SysV style init scripts. We have chosen this style because it
    14 is widely used and we feel confortable with it. If you want to try something
    15 else, someone has written an LFS-Hint on BSD style init scripts at <ulink
    16 url="http://archive.linuxfromscratch.org/lfs-hints/bsd-init.txt">
    17 http://archive.linuxfromscratch.org/lfs-hints/bsd-init.txt</ulink>.
    18 </para>
     11<para>We will be using SysV style init scripts. We have chosen this style
     12because it is widely used and we feel confortable with it. If you want to
     13try something else, someone has written an LFS-Hint on BSD style init scripts
     14at <ulink
     15url="http://archive.linuxfromscratch.org/lfs-hints/bsd-init.txt">http://archive.linuxfromscratch.org/lfs-hints/bsd-init.txt</ulink>
     16.</para>
    1917
    2018</sect1>
  • chapter07/loadkeys.xml

    r46f5461 rb822811  
    22<title>Creating the loadkeys script</title>
    33
    4 <para>
    5 A user only needs to create this script if he don't have a default 101 keys
    6 US keyboard layout. Create the
     4<para>A user only needs to create this script if he don't have a
     5default 101 keys US keyboard layout. Create the
    76<filename>/etc/init.d/loadkeys</filename> script by running the
    8 following command:
    9 </para>
     7following command:</para>
    108
    11 <para>
    12 <screen>
    13 <userinput>cat &gt; loadkeys &lt;&lt; "EOF"</userinput>
     9<para><screen><userinput>cat &gt; loadkeys &lt;&lt; "EOF"</userinput>
    1410#!/bin/sh
    1511# Begin /etc/init.d/loadkeys
     
    3026
    3127# End /etc/init.d/loadkeys
    32 <userinput>EOF</userinput>
    33 </screen>
    34 </para>
     28<userinput>EOF</userinput></screen></para>
    3529
    3630</sect1>
  • chapter07/localnet.xml

    r46f5461 rb822811  
    22<title>Creating the /etc/init.d/localnet boot script</title>
    33
    4 <para>
    5 Create the <filename>/etc/init.d/localnet</filename> script by running
    6 the following command:
    7 </para>
     4<para>Create the <filename>/etc/init.d/localnet</filename> script by running
     5the following command:</para>
    86
    9 <para>
    10 <screen>
    11 <userinput>cat &gt; /etc/init.d/localnet &lt;&lt; "EOF"</userinput>
     7<para><screen><userinput>cat &gt; /etc/init.d/localnet &lt;&lt; "EOF"</userinput>
    128#!/bin/sh
    139# Begin /etc/init.d/localnet
     
    5046
    5147# End /etc/init.d/localnet
    52 <userinput>EOF</userinput>
    53 </screen>
    54 </para>
     48<userinput>EOF</userinput></screen></para>
    5549
    5650</sect1>
  • chapter07/mountfs.xml

    r46f5461 rb822811  
    22<title>Creating the mountfs script</title>
    33
    4 <para>
    5 Create the <filename>/etc/init.d/mountfs</filename> script by running
    6 the following command:
    7 </para>
     4<para>Create the <filename>/etc/init.d/mountfs</filename> script by running
     5the following command:</para>
    86
    9 <para>
    10 <screen>
    11 <userinput>cat &gt; mountfs &lt;&lt; "EOF"</userinput>
     7<para><screen><userinput>cat &gt; mountfs &lt;&lt; "EOF"</userinput>
    128#!/bin/sh
    139# Begin /etc/init.d/mountfs
     
    4440        #
    4541
    46         echo > /etc/mtab
     42        echo &gt; /etc/mtab
    4743        /bin/mount -f -o remount,rw /
    4844
     
    10399
    104100# End /etc/init.d/mountfs
    105 <userinput>EOF</userinput>
    106 </screen>
    107 </para>
     101<userinput>EOF</userinput></screen></para>
    108102
    109103</sect1>
  • chapter07/network.xml

    r46f5461 rb822811  
    22<title>Creating the /etc/sysconfig/network file</title>
    33
    4 <para>
    5 A new file <filename>/etc/sysconfig/network</filename> is created and the
    6 hostname is put in it by running:
    7 </para>
     4<para>A new file <filename>/etc/sysconfig/network</filename> is created and the
     5hostname is put in it by running:</para>
    86
    9 <para>
    10 <screen>
    11 <userinput>echo "HOSTNAME=lfs" &gt; /etc/sysconfig/network</userinput>
    12 </screen>
    13 </para>
     7<para><screen><userinput>echo "HOSTNAME=lfs" &gt;
     8/etc/sysconfig/network</userinput></screen></para>
    149
    15 <para>
    16 <quote>lfs</quote> needs to be replaced by the name the computer is to be
    17 called.
    18 A user should not enter the FQDN (Fully Qualified Domain
     10<para><quote>lfs</quote> needs to be replaced by the name the computer is
     11to be called.  A user should not enter the FQDN (Fully Qualified Domain
    1912Name) here. That information will be put in the
    20 <filename>/etc/hosts</filename> file later.
    21 </para>
     13<filename>/etc/hosts</filename> file later.</para>
    2214
    2315</sect1>
  • chapter07/rc.xml

    r46f5461 rb822811  
    22<title>Creating the rc script</title>
    33
    4 <para>
    5 The first main boot script is the <filename>/etc/init.d/rc</filename> script.
    6 Create the <filename>/etc/init.d/rc</filename> script by running the
    7 following command:
    8 </para>
    9 
    10 <para>
    11 <screen>
    12 <userinput>cat &gt; rc &lt;&lt; "EOF"</userinput>
     4<para>The first main boot script is the <filename>/etc/init.d/rc</filename>
     5script. Create the <filename>/etc/init.d/rc</filename> script by running the
     6following command:</para>
     7
     8<para><screen><userinput>cat &gt; rc &lt;&lt; "EOF"</userinput>
    139#!/bin/sh
    1410# Begin /etc/init.d/rc
     
    247243
    248244# End /etc/init.d/rc
    249 <userinput>EOF</userinput>
    250 </screen>
    251 </para>
     245<userinput>EOF</userinput></screen></para>
    252246
    253247</sect1>
  • chapter07/rcS.xml

    r46f5461 rb822811  
    22<title>Creating the rcS script</title>
    33
    4 <para>
    5 The second main boot script is the <filename>rcS</filename> script. Create 
    6 the <filename>/etc/init.d/rcS</filename> script by running the following
    7 command:
    8 </para>
     4<para>The second main boot script is the <filename>rcS</filename> script.
     5Create the <filename>/etc/init.d/rcS</filename> script by running the following
     6command:</para>
    97
    10 <para>
    11 <screen>
    12 <userinput>cat &gt; rcS &lt;&lt; "EOF"</userinput>
     8<para><screen><userinput>cat &gt; rcS &lt;&lt; "EOF"</userinput>
    139#!/bin/sh
    1410# Begin /etc/init.d/rcS
     
    3733
    3834# End /etc/init.d/rcS
    39 <userinput>EOF</userinput>
    40 </screen>
    41 </para>
     35<userinput>EOF</userinput></screen></para>
    4236
    4337</sect1>
  • chapter07/reboot.xml

    r46f5461 rb822811  
    22<title>Creating the reboot script</title>
    33
    4 <para>
    5 Create the <filename>/etc/init.d/reboot</filename> script by running the
    6 following command:
    7 </para>
     4<para>Create the <filename>/etc/init.d/reboot</filename> script by running the
     5following command:</para>
    86
    9 <para>
    10 <screen>
    11 <userinput>cat &gt; reboot &lt;&lt; "EOF"</userinput>
     7<para><screen><userinput>cat &gt; reboot &lt;&lt; "EOF"</userinput>
    128#!/bin/sh
    139# Begin /etc/init.d/reboot
     
    2319
    2420# End /etc/init.d/reboot
    25 <userinput>EOF</userinput>
    26 </screen>
    27 </para>
     21<userinput>EOF</userinput></screen></para>
    2822
    2923</sect1>
  • chapter07/sendsignals.xml

    r46f5461 rb822811  
    22<title>Creating the sendsignals script</title>
    33
    4 <para>
    5 Creat the <filename>/etc/init.d/sendsignals</filename> script by running
    6 the following command:
    7 </para>
     4<para>Creat the <filename>/etc/init.d/sendsignals</filename> script by running
     5the following command:</para>
    86
    9 <para>
    10 <screen>
    11 <userinput>cat &gt; sendsignals &lt;&lt; "EOF"</userinput>
     7<para><screen><userinput>cat &gt; sendsignals &lt;&lt; "EOF"</userinput>
    128#!/bin/sh
    139# Begin /etc/init.d/sendsignals
     
    3733
    3834# End /etc/init.d/sendsignals
    39 <userinput>EOF</userinput>
    40 </screen>
    41 </para>
     35<userinput>EOF</userinput></screen></para>
    4236
    4337</sect1>
  • chapter07/setclock.xml

    r46f5461 rb822811  
    22<title>Creating the setclock script</title>
    33
    4 <para>
    5 The following script is only for real use when the hardware clock (also
     4<para>The following script is only for real use when the hardware clock (also
    65known as BIOS or CMOS clock) isn't set to GMT time. The recommended
    76setup is setting the hardware clock to GMT and having the time converted
     
    1110the time is properly displayed on those OS'es. This script will reset
    1211the kernel time to the hardware clock without converting the time using
    13 the /etc/localtime symlink.
    14 </para>
     12the /etc/localtime symlink.</para>
    1513
    16 <para>
    17 If you want to use this script on your system even if the
     14<para>If you want to use this script on your system even if the
    1815hardware clock is set to GMT, then the UTC variable below has to be
    19 changed to the value of <emphasis>1</emphasis>.
    20 </para>
     16changed to the value of <emphasis>1</emphasis>.</para>
    2117
    22 <para>
    23 Creat the <filename>/etc/init.d/setclock</filename> script by running
    24 the following command:
    25 </para>
     18<para>Create the <filename>/etc/init.d/setclock</filename> script by running
     19the following command:</para>
    2620
    27 <para>
    28 <screen>
    29 <userinput>cat &gt; setclock &lt;&lt; "EOF"</userinput>
     21<para><screen><userinput>cat &gt; setclock &lt;&lt; "EOF"</userinput>
    3022#!/bin/sh
    3123# Begin /etc/init.d/setclock
     
    6658
    6759# End /etc/init.d/setclock
    68 <userinput>EOF</userinput>
    69 </screen>
    70 </para>
     60<userinput>EOF</userinput></screen></para>
    7161
    7262<sect2>
    7363<title>Creating the /etc/sysconfig/clock file</title>
    7464
    75 <para>
    76 Create a new file <filename>/etc/sysconfig/clock</filename> by running
    77 the following:
    78 </para>
     65<para>Create a new file <filename>/etc/sysconfig/clock</filename> by running
     66the following:</para>
    7967
    80 <para>
    81 <screen>
    82 <userinput>cat &gt; /etc/sysconfig/clock &lt;&lt; "EOF"</userinput>
     68<para><screen><userinput>cat &gt; /etc/sysconfig/clock &lt;&lt; "EOF"</userinput>
    8369# Begin /etc/sysconfig/clock
    8470
     
    8672
    8773# End /etc/sysconfig/clock
    88 <userinput>EOF</userinput>
    89 </screen>
    90 </para>
     74<userinput>EOF</userinput></screen></para>
    9175
    92 <para>
    93 If the hardware clock (also known as BIOS or CMOS clock) is not set to
     76<para>If the hardware clock (also known as BIOS or CMOS clock) is not set to
    9477GMT time, then the UTC variable in the /etc/sysconfig/clock file needs to be
    95 set to
    96 the value <emphasis>0</emphasis> (zero).
    97 </para>
     78set to the value <emphasis>0</emphasis> (zero).</para>
    9879
    99 <para>
    100 Now, you may want to take a look at a very good hint explaining how we
    101 deal with time on LFS at
    102 <ulink url="http://archive.linuxfromscratch.org/lfs-hints/time.txt">
    103 http://archive.linuxfromscratch.org/lfs-hints/time.txt</ulink>.
    104 It explains issues such as timezones, UTC, and the TZ
    105 environment variable.
    106 </para>
     80<para>Now, you may want to take a look at a very good hint explaining how we
     81deal with time on LFS at <ulink
     82url="http://archive.linuxfromscratch.org/lfs-hints/time.txt">http://archive.linuxfromscratch.org/lfs-hints/time.txt</ulink>.
     83It explains issues such as timezones, UTC, and the TZ
     84environment variable.</para>
    10785
    10886</sect2>
  • chapter07/symperm.xml

    r46f5461 rb822811  
    22<title>Setting up symlinks and permissions</title>
    33
    4 <para>
    5 These files get the proper permissions and the necessary symlinks are created
    6 by running the following commands. If you didn't create the loadkeys
    7 and setclock scripts, make sure not to type them in the commands below.
    8 </para>
     4<para>These files get the proper permissions and the necessary symlinks
     5are created by running the following commands. If you didn't create the loadkeys
     6and setclock scripts, make sure not to type them in the commands below.</para>
    97
    10 <para>
    11 A note of caution: all the symlinks (that start with an S or K) have to
     8<para>A note of caution: all the symlinks (that start with an S or K) have to
    129be of the form Sxxxname where xxx are three digits donating the order in
    1310which the script is executed (the lower the number the sooner it's
     
    1512you pad with extra zero's at the beginning. This means, don't use
    1613S20mydaemon, but S020mydaemon. And don't use K2otherdaemon, but
    17 K002otherdaemon.
    18 </para>
     14K002otherdaemon.</para>
    1915
    20 <para>
    21 <screen>
    22 <userinput>cd /etc/init.d &amp;&amp;</userinput>
     16<para><screen><userinput>cd /etc/init.d &amp;&amp;</userinput>
    2317<userinput>chmod 754 rc rcS functions checkfs halt loadkeys mountfs reboot &amp;&amp;</userinput>
    2418<userinput>chmod 754 sendsignals setclock sysklogd template &amp;&amp;</userinput>
     
    5650<userinput>cd ../rc5.d &amp;&amp;</userinput>
    5751<userinput>ln -s ../init.d/sysklogd S100sysklogd &amp;&amp;</userinput>
    58 <userinput>ln -s ../init.d/ethnet S200ethnet</userinput>
    59 </screen>
    60 </para>
     52<userinput>ln -s ../init.d/ethnet S200ethnet</userinput></screen></para>
    6153
    6254</sect1>
  • chapter07/sysklogd.xml

    r46f5461 rb822811  
    22<title>Creating the sysklogd script</title>
    33
    4 <para>
    5 Create the <filename>/etc/init.d/sysklogd</filename> script by running
    6 the following command:
    7 </para>
     4<para>Create the <filename>/etc/init.d/sysklogd</filename> script by running
     5the following command:</para>
    86
    9 <para>
    10 <screen>
    11 <userinput>cat &gt; sysklogd &lt;&lt; "EOF"</userinput>
     7<para><screen><userinput>cat &gt; sysklogd &lt;&lt; "EOF"</userinput>
    128#!/bin/sh
    139# Begin /etc/init.d/sysklogd
     
    6056
    6157# End /etc/init.d/sysklogd
    62 <userinput>EOF</userinput>
    63 </screen>
    64 </para>
     58<userinput>EOF</userinput></screen></para>
    6559
    6660</sect1>
  • chapter07/template.xml

    r46f5461 rb822811  
    22<title>Creating the template script</title>
    33
    4 <para>
    5 Create the <filename>/etc/init.d/template</filename> script by running
    6 the following command:
    7 </para>
     4<para>Create the <filename>/etc/init.d/template</filename> script by running
     5the following command:</para>
    86
    9 <para>
    10 <screen>
    11 <userinput>cat &gt; template &lt;&lt; "EOF"</userinput>
     7<para><screen><userinput>cat &gt; template &lt;&lt; "EOF"</userinput>
    128#!/bin/sh
    139# Begin /etc/init.d/
     
    5349
    5450# End /etc/init.d/
    55 <userinput>EOF</userinput>
    56 </screen>
    57 </para>
     51<userinput>EOF</userinput></screen></para>
    5852
    5953</sect1>
  • chapter07/usage.xml

    r46f5461 rb822811  
    22<title>How does the booting process with these scripts work?</title>
    33
    4 <para>
    5 Linux uses a special booting facility named SysVinit. It's based on a
     4<para>Linux uses a special booting facility named SysVinit. It's based on a
    65concept of <emphasis>runlevels</emphasis>. It can be widely different
    76from one system to another, so it can not be assumed that because things
    87worked in &lt;insert distro name&gt; they should work like that in LFS
    98too. LFS has it's own way of doing things, but it respects generally
    10 accepted standards.
    11 </para>
     9accepted standards.</para>
    1210
    13 <para>
    14 SysVinit (which we'll call <emphasis>init</emphasis> from now on) works
     11<para>SysVinit (which we'll call <emphasis>init</emphasis> from now on) works
    1512using a runlevels scheme. There are 7 (from 0 to 6) runlevels
    1613(actually, there are more runlevels but they are for special cases and
     
    1815one of those corresponds to the things the computer is supposed to do when
    1916it starts up. The default runlevel is 3. Here are the descriptions of the
    20 different runlevels as they are often implemented:
    21 </para>
     17different runlevels as they are often implemented:</para>
    2218
    23 <literallayout>
    24 0: halt the computer
     19<literallayout>0: halt the computer
    25201: single-user mode
    26212: multi-user mode without networking
     
    28234: reserved for customization, otherwise does the same as 3
    29245: same as 4, it is usually used for GUI login (like X's xdm or KDE's kdm)
    30 6: reboot the computer
    31 </literallayout>
     256: reboot the computer</literallayout>
    3226
    33 <para>
    34 The command used to change runlevels is <userinput>init
     27<para>The command used to change runlevels is <userinput>init
    3528&lt;runlevel&gt;</userinput> where &lt;runlevel&gt; is
    3629the target runlevel. For example, to reboot the computer, a user would issue
    3730the init 6 command. The reboot command is just an alias, as is the halt
    38 command an alias to init 0.
    39 </para>
     31command an alias to init 0.</para>
    4032
    41 <para>
    42 The /etc/init.d/rcS script is run at every startup of the computer,
     33<para>The /etc/init.d/rcS script is run at every startup of the computer,
    4334before any runlevel is executed and runs the scripts listed in
    44 /etc/rcS.d
    45 </para>
     35/etc/rcS.d</para>
    4636
    47 <para>
    48 There are a number of directories under /etc that look like like rc?.d
     37<para>There are a number of directories under /etc that look like like rc?.d
    4938where ? is the number of the runlevel and rcS.d. A user might take a look
    5039at one of
     
    5645are run, from 000 to 999; the lower the number the sooner it gets
    5746executed. When init switches to another runlevel, the appropriate
    58 services get killed and others get started.
    59 </para>
     47services get killed and others get started.</para>
    6048
    61 <para>
    62 The real scripts are in /etc/init.d. They do all the work, and the
     49<para>The real scripts are in /etc/init.d. They do all the work, and the
    6350symlinks all point to them. Killing links and starting
    6451links point to the same script in /etc/init.d. That's because the scripts
     
    6653status. When a K link is encountered, the appropriate script is run with
    6754the stop argument. When a S link is encountered, the appropriate script
    68 is run with the start argument.
    69 </para>
     55is run with the start argument.</para>
    7056
    71 <para>
    72 These are descriptions of what the arguments make the scripts do:
    73 </para>
     57<para>These are descriptions of what the arguments make the
     58scripts do:</para>
    7459
    7560<itemizedlist>
    7661
    77 <listitem><para>
    78 <emphasis>start</emphasis>: The service is started.
    79 </para></listitem>
     62<listitem><para><emphasis>start</emphasis>: The service is
     63started.</para></listitem>
    8064
    81 <listitem><para>
    82 <emphasis>stop</emphasis>: The service is stopped.
    83 </para></listitem>
     65<listitem><para><emphasis>stop</emphasis>: The service is
     66stopped.</para></listitem>
    8467
    85 <listitem><para>
    86 <emphasis>restart</emphasis>: The service is stopped and then started again.
    87 </para></listitem>
     68<listitem><para><emphasis>restart</emphasis>: The service is
     69stopped and then started again.</para></listitem>
    8870
    89 <listitem><para>
    90 <emphasis>reload</emphasis>: The configuration of the service is updated.
     71<listitem><para><emphasis>reload</emphasis>: The configuration
     72of the service is updated.
    9173This is used after the configuration file of a service was modified, when
    92 the service doesn't need to be restarted.
    93 </para></listitem>
     74the service doesn't need to be restarted.</para></listitem>
    9475
    95 <listitem><para>
    96 <emphasis>status</emphasis>: Tells if the service is running and with
    97 which PID's.
    98 </para></listitem>
     76<listitem><para><emphasis>status</emphasis>: Tells if the service
     77is running and with which PID's.</para></listitem>
    9978
    10079</itemizedlist>
    10180
    102 <para>
    103 Feel free to modify the way the boot process works (after all it's your
     81<para>Feel free to modify the way the boot process works (after all it's your
    10482LFS system, not ours). The files here are just an example of how it can be
    105 done in a nice way (well what we consider nice anyway. You may hate it).
    106 </para>
     83done in a nice way (well what we consider nice anyway. You may hate it).</para>
    10784
    10885</sect1>
Note: See TracChangeset for help on using the changeset viewer.