diff options
Diffstat (limited to 'chapter07')
-rw-r--r-- | chapter07/checkfs.xml | 6 | ||||
-rw-r--r-- | chapter07/createdirs.xml | 13 | ||||
-rw-r--r-- | chapter07/ethnet.xml | 29 | ||||
-rw-r--r-- | chapter07/functions.xml | 6 | ||||
-rw-r--r-- | chapter07/halt.xml | 6 | ||||
-rw-r--r-- | chapter07/hosts.xml | 26 | ||||
-rw-r--r-- | chapter07/loadkeys.xml | 6 | ||||
-rw-r--r-- | chapter07/localnet.xml | 6 | ||||
-rw-r--r-- | chapter07/mountfs.xml | 6 | ||||
-rw-r--r-- | chapter07/network.xml | 8 | ||||
-rw-r--r-- | chapter07/rc.xml | 6 | ||||
-rw-r--r-- | chapter07/rcS.xml | 6 | ||||
-rw-r--r-- | chapter07/reboot.xml | 6 | ||||
-rw-r--r-- | chapter07/sendsignals.xml | 6 | ||||
-rw-r--r-- | chapter07/setclock.xml | 12 | ||||
-rw-r--r-- | chapter07/symperm.xml | 84 | ||||
-rw-r--r-- | chapter07/sysklogd.xml | 6 | ||||
-rw-r--r-- | chapter07/template.xml | 6 |
18 files changed, 144 insertions, 100 deletions
diff --git a/chapter07/checkfs.xml b/chapter07/checkfs.xml index d19959303..83e854752 100644 --- a/chapter07/checkfs.xml +++ b/chapter07/checkfs.xml @@ -6,7 +6,8 @@ A new file <filename>/etc/init.d/checkfs</filename> is created containing the following: </para> -<literallayout> +<para> +<screen> <userinput>cat > checkfs << "EOF"</userinput> #!/bin/sh # Begin /etc/init.d/checkfs @@ -108,7 +109,8 @@ fi # End /etc/init.d/checkfs <userinput>EOF</userinput> -</literallayout> +</screen> +</para> </sect1> diff --git a/chapter07/createdirs.xml b/chapter07/createdirs.xml index fbffcb517..90980d264 100644 --- a/chapter07/createdirs.xml +++ b/chapter07/createdirs.xml @@ -6,12 +6,13 @@ We need to start by creating a few extra directories that are used by the boot scripts. These directories are created by running: </para> -<blockquote><literallayout> - <userinput>cd /etc &&</userinput> - <userinput>mkdir rc{0,1,2,3,4,5,6,S}.d init.d sysconfig - &&</userinput> - <userinput>cd init.d</userinput> -</literallayout></blockquote> +<para> +<screen> +<userinput>cd /etc &&</userinput> +<userinput>mkdir rc{0,1,2,3,4,5,6,S}.d init.d sysconfig &&</userinput> +<userinput>cd init.d</userinput> +</screen> +</para> </sect1> diff --git a/chapter07/ethnet.xml b/chapter07/ethnet.xml index c3db3e72d..3659c71d7 100644 --- a/chapter07/ethnet.xml +++ b/chapter07/ethnet.xml @@ -11,7 +11,8 @@ A new file <filename>/etc/init.d/ethnet</filename> is created containing the following: </para> -<literallayout> +<para> +<screen> <userinput>cat > /etc/init.d/ethnet << "EOF"</userinput> #!/bin/sh # Begin /etc/init.d/ethnet @@ -114,7 +115,8 @@ esac # End /etc/init.d/ethnet <userinput>EOF</userinput> -</literallayout> +</screen> +</para> <sect2> <title>Adding default gateway to /etc/sysconfig/network</title> @@ -123,12 +125,14 @@ esac If a default gateway is required to be setup, the following command does that: </para> -<literallayout> +<para> +<screen> <userinput>cat >> /etc/sysconfig/network << "EOF"</userinput> GATEWAY=192.168.1.2 GATEWAY_IF=eth0 <userinput>EOF</userinput> -</literallayout> +</screen> +</para> <para> GATEWAY and GATEWAY_IF need to be changed to match the network setup. @@ -153,9 +157,11 @@ identification number (or whatever a user named it). First the nic-config directory is created by running: </para> -<blockquote><literallayout> - <userinput>mkdir /etc/sysconfig/nic-config</userinput> -</literallayout></blockquote> +<para> +<screen> +<userinput>mkdir /etc/sysconfig/nic-config</userinput> +</screen> +</para> <para> @@ -163,16 +169,17 @@ Now, new files are created in that directory containing the following. This creates a sample file ifcfg-eth0: </para> -<literallayout> -<userinput>cat > /etc/sysconfig/nic-config/ifcfg-eth0 - << "EOF"</userinput> +<para> +<screen> +<userinput>cat > /etc/sysconfig/nic-config/ifcfg-eth0 << "EOF"</userinput> ONBOOT=yes DEVICE=eth0 IP=192.168.1.1 NETMASK=255.255.255.0 BROADCAST=192.168.1.255 <userinput>EOF</userinput> -</literallayout> +</screen> +</para> <para> Of course, the values of those four variables have to be changed diff --git a/chapter07/functions.xml b/chapter07/functions.xml index 10b53f501..37435e23a 100644 --- a/chapter07/functions.xml +++ b/chapter07/functions.xml @@ -6,7 +6,8 @@ A new file <filename>/etc/init.d/functions</filename> is created containing the following: </para> -<literallayout> +<para> +<screen> <userinput>cat > functions << "EOF"</userinput> #!/bin/sh # Begin /etc/init.d/functions @@ -484,7 +485,8 @@ statusproc() # End /etc/init.d/functions <userinput>EOF</userinput> -</literallayout> +</screen> +</para> </sect1> diff --git a/chapter07/halt.xml b/chapter07/halt.xml index f3938d17b..f1e93bfd7 100644 --- a/chapter07/halt.xml +++ b/chapter07/halt.xml @@ -6,7 +6,8 @@ A new file <filename>/etc/init.d/halt</filename> is created containing the following: </para> -<literallayout> +<para> +<screen> <userinput>cat > halt << "EOF"</userinput> #!/bin/sh # Begin /etc/init.d/halt @@ -19,7 +20,8 @@ following: # End /etc/init.d/halt <userinput>EOF</userinput> -</literallayout> +</screen> +</para> </sect1> diff --git a/chapter07/hosts.xml b/chapter07/hosts.xml index 01684ee6d..3d8613186 100644 --- a/chapter07/hosts.xml +++ b/chapter07/hosts.xml @@ -7,21 +7,25 @@ IP-address, FQDN and possible aliases for use in the /etc/hosts file. An example is: </para> -<blockquote><literallayout> - <my-IP> myhost.mydomain.org aliases -</literallayout></blockquote> +<para> +<screen> +<my-IP> myhost.mydomain.org aliases +</screen> +</para> <para> It should made sure that the IP-address is in the private network IP-address range. Valid ranges are: </para> -<blockquote><literallayout> +<para> +<screen> Class Networks A 10.0.0.0 B 172.16.0.0 through 172.31.0.0 C 192.168.0.0 through 192.168.255.0 -</literallayout></blockquote> +</screen> +</para> <para> A valid IP address could be 192.168.1.1. A valid FQDN for this IP could @@ -39,7 +43,8 @@ If a network card is not going to be configured, a new file <filename>/etc/hosts</filename> is created by running: </para> -<literallayout> +<para> +<screen> <userinput>cat > /etc/hosts << "EOF"</userinput> # Begin /etc/hosts (no network card version) @@ -47,14 +52,16 @@ If a network card is not going to be configured, a new file # End /etc/hosts (no network card version) <userinput>EOF</userinput> -</literallayout> +</screen> +</para> <para> If a network card is to be configured, a new file <filename>/etc/hosts</filename> is created containing: </para> -<literallayout> +<para> +<screen> <userinput>cat > /etc/hosts << "EOF"</userinput> # Begin /etc/hosts (network card version) @@ -63,7 +70,8 @@ If a network card is to be configured, a new file # End /etc/hosts (network card version) <userinput>EOF</userinput> -</literallayout> +</screen> +</para> <para> Of course, the 192.168.1.1 and www.mydomain.org have to be changed to the diff --git a/chapter07/loadkeys.xml b/chapter07/loadkeys.xml index 01f004f85..9520e45c2 100644 --- a/chapter07/loadkeys.xml +++ b/chapter07/loadkeys.xml @@ -8,7 +8,8 @@ US keyboard layout. A new file created: </para> -<literallayout> +<para> +<screen> <userinput>cat > loadkeys << "EOF"</userinput> #!/bin/sh # Begin /etc/init.d/loadkeys @@ -29,7 +30,8 @@ evaluate_retval # End /etc/init.d/loadkeys <userinput>EOF</userinput> -</literallayout> +</screen> +</para> </sect1> diff --git a/chapter07/localnet.xml b/chapter07/localnet.xml index 1aa413b37..e7d1c7afc 100644 --- a/chapter07/localnet.xml +++ b/chapter07/localnet.xml @@ -6,7 +6,8 @@ A new file <filename>/etc/init.d/localnet</filename> is created containing the following: </para> -<literallayout> +<para> +<screen> <userinput>cat > /etc/init.d/localnet << "EOF"</userinput> #!/bin/sh # Begin /etc/init.d/localnet @@ -49,7 +50,8 @@ esac # End /etc/init.d/localnet <userinput>EOF</userinput> -</literallayout> +</screen> +</para> </sect1> diff --git a/chapter07/mountfs.xml b/chapter07/mountfs.xml index 242924f42..969cac4f5 100644 --- a/chapter07/mountfs.xml +++ b/chapter07/mountfs.xml @@ -6,7 +6,8 @@ A new file <filename>/etc/init.d/mountfs</filename> is created containing the following: </para> -<literallayout> +<para> +<screen> <userinput>cat > mountfs << "EOF"</userinput> #!/bin/sh # Begin /etc/init.d/mountfs @@ -102,7 +103,8 @@ esac # End /etc/init.d/mountfs <userinput>EOF</userinput> -</literallayout> +</screen> +</para> </sect1> diff --git a/chapter07/network.xml b/chapter07/network.xml index 121dc5cb1..f9cea6f1e 100644 --- a/chapter07/network.xml +++ b/chapter07/network.xml @@ -6,9 +6,11 @@ A new file <filename>/etc/sysconfig/network</filename> is created and the hostname is put in it by running: </para> -<blockquote><literallayout> - <userinput>echo "HOSTNAME=lfs" > /etc/sysconfig/network</userinput> -</literallayout></blockquote> +<para> +<screen> +<userinput>echo "HOSTNAME=lfs" > /etc/sysconfig/network</userinput> +</screen> +</para> <para> <quote>lfs</quote> needs to be replaced by the name the computer is to be diff --git a/chapter07/rc.xml b/chapter07/rc.xml index 2e86e031c..2372755a5 100644 --- a/chapter07/rc.xml +++ b/chapter07/rc.xml @@ -6,7 +6,8 @@ The first main boot script is the <filename>/etc/init.d/rc</filename> script. A new file <filename>/etc/init.d/rc</filename> is created containing the following: </para> -<literallayout> +<para> +<screen> <userinput>cat > rc << "EOF"</userinput> #!/bin/sh # Begin /etc/init.d/rc @@ -245,7 +246,8 @@ fi # End /etc/init.d/rc <userinput>EOF</userinput> -</literallayout> +</screen> +</para> </sect1> diff --git a/chapter07/rcS.xml b/chapter07/rcS.xml index 3a3b0fe16..ca53824a2 100644 --- a/chapter07/rcS.xml +++ b/chapter07/rcS.xml @@ -6,7 +6,8 @@ The second main boot script is the <filename>rcS</filename> script. Create a new file <filename>/etc/init.d/rcS</filename> containing the following: </para> -<literallayout> +<para> +<screen> <userinput>cat > rcS << "EOF"</userinput> #!/bin/sh # Begin /etc/init.d/rcS @@ -35,7 +36,8 @@ done # End /etc/init.d/rcS <userinput>EOF</userinput> -</literallayout> +</screen> +</para> </sect1> diff --git a/chapter07/reboot.xml b/chapter07/reboot.xml index 9ce1a6037..4fb352722 100644 --- a/chapter07/reboot.xml +++ b/chapter07/reboot.xml @@ -6,7 +6,8 @@ Create a new file <filename>/etc/init.d/reboot</filename> containing the following: </para> -<literallayout> +<para> +<screen> <userinput>cat > reboot << "EOF"</userinput> #!/bin/sh # Begin /etc/init.d/reboot @@ -22,7 +23,8 @@ echo "System reboot in progress..." # End /etc/init.d/reboot <userinput>EOF</userinput> -</literallayout> +</screen> +</para> </sect1> diff --git a/chapter07/sendsignals.xml b/chapter07/sendsignals.xml index b2ed0c80e..30d48ac7d 100644 --- a/chapter07/sendsignals.xml +++ b/chapter07/sendsignals.xml @@ -6,7 +6,8 @@ Create a new file <filename>/etc/init.d/sendsignals</filename> containing the following: </para> -<literallayout> +<para> +<screen> <userinput>cat > sendsignals << "EOF"</userinput> #!/bin/sh # Begin /etc/init.d/sendsignals @@ -36,7 +37,8 @@ evaluate_retval # End /etc/init.d/sendsignals <userinput>EOF</userinput> -</literallayout> +</screen> +</para> </sect1> diff --git a/chapter07/setclock.xml b/chapter07/setclock.xml index 05147f38d..4821459ad 100644 --- a/chapter07/setclock.xml +++ b/chapter07/setclock.xml @@ -20,7 +20,8 @@ hardware clock is set to GMT, then the UTC variable below has to be changed value of <emphasis>1</emphasis>. </para> -<literallayout> +<para> +<screen> <userinput>cat > setclock << "EOF"</userinput> #!/bin/sh # Begin /etc/init.d/setclock @@ -61,7 +62,8 @@ evaluate_retval # End /etc/init.d/setclock <userinput>EOF</userinput> -</literallayout> +</screen> +</para> <sect2> <title>Creating the /etc/sysconfig/clock file</title> @@ -71,7 +73,8 @@ Create a new file <filename>/etc/sysconfig/clock</filename> by running the following: </para> -<literallayout> +<para> +<screen> <userinput>cat > /etc/sysconfig/clock << "EOF"</userinput> # Begin /etc/sysconfig/clock @@ -79,7 +82,8 @@ UTC=1 # End /etc/sysconfig/clock <userinput>EOF</userinput> -</literallayout> +</screen> +</para> <para> If the hardware clock (also known as BIOS or CMOS clock) is not set to diff --git a/chapter07/symperm.xml b/chapter07/symperm.xml index 03c258650..161a92e94 100644 --- a/chapter07/symperm.xml +++ b/chapter07/symperm.xml @@ -17,49 +17,47 @@ S20mydaemon, but S020mydaemon. And don't use K2otherdaemon, but K002otherdaemon. </para> -<blockquote><literallayout> - <userinput>cd /etc/init.d &&</userinput> - <userinput>chmod 754 rc rcS functions checkfs halt loadkeys mountfs - reboot &&</userinput> - <userinput>chmod 754 sendsignals setclock sysklogd template - &&</userinput> - <userinput>chmod 754 localnet ethnet &&</userinput> - <userinput>cd ../rc0.d &&</userinput> - <userinput>ln -s ../init.d/ethnet K800ethnet &&</userinput> - <userinput>ln -s ../init.d/sysklogd K900sysklogd &&</userinput> - <userinput>ln -s ../init.d/sendsignals S800sendsignals && - </userinput> - <userinput>ln -s ../init.d/mountfs S900mountfs &&</userinput> - <userinput>ln -s ../init.d/halt S999halt &&</userinput> - <userinput>cd ../rc6.d &&</userinput> - <userinput>ln -s ../init.d/ethnet K800ethnet &&</userinput> - <userinput>ln -s ../init.d/sysklogd K900sysklogd &&</userinput> - <userinput>ln -s ../init.d/sendsignals S800sendsignals && - </userinput> - <userinput>ln -s ../init.d/mountfs S900mountfs &&</userinput> - <userinput>ln -s ../init.d/reboot S999reboot &&</userinput> - <userinput>cd ../rcS.d &&</userinput> - <userinput>ln -s ../init.d/localnet S100localnet &&</userinput> - <userinput>ln -s ../init.d/checkfs S200checkfs &&</userinput> - <userinput>ln -s ../init.d/mountfs S300mountfs &&</userinput> - <userinput>ln -s ../init.d/setclock S400setclock &&</userinput> - <userinput>ln -s ../init.d/loadkeys S500loadkeys &&</userinput> - <userinput>cd ../rc1.d &&</userinput> - <userinput>ln -s ../init.d/ethnet K800ethnet &&</userinput> - <userinput>ln -s ../init.d/sysklogd K900sysklogd &&</userinput> - <userinput>cd ../rc2.d &&</userinput> - <userinput>ln -s ../init.d/sysklogd S100sysklogd &&</userinput> - <userinput>ln -s ../init.d/ethnet K800ethnet &&</userinput> - <userinput>cd ../rc3.d &&</userinput> - <userinput>ln -s ../init.d/sysklogd S100sysklogd &&</userinput> - <userinput>ln -s ../init.d/ethnet S200ethnet &&</userinput> - <userinput>cd ../rc4.d &&</userinput> - <userinput>ln -s ../init.d/sysklogd S100sysklogd &&</userinput> - <userinput>ln -s ../init.d/ethnet S200ethnet &&</userinput> - <userinput>cd ../rc5.d &&</userinput> - <userinput>ln -s ../init.d/sysklogd S100sysklogd</userinput> - <userinput>ln -s ../init.d/ethnet S200ethnet &&</userinput> -</literallayout></blockquote> +<para> +<screen> +<userinput>cd /etc/init.d &&</userinput> +<userinput>chmod 754 rc rcS functions checkfs halt loadkeys mountfs reboot &&</userinput> +<userinput>chmod 754 sendsignals setclock sysklogd template &&</userinput> +<userinput>chmod 754 localnet ethnet &&</userinput> +<userinput>cd ../rc0.d &&</userinput> +<userinput>ln -s ../init.d/ethnet K800ethnet &&</userinput> +<userinput>ln -s ../init.d/sysklogd K900sysklogd &&</userinput> +<userinput>ln -s ../init.d/sendsignals S800sendsignals &&</userinput> +<userinput>ln -s ../init.d/mountfs S900mountfs &&</userinput> +<userinput>ln -s ../init.d/halt S999halt &&</userinput> +<userinput>cd ../rc6.d &&</userinput> +<userinput>ln -s ../init.d/ethnet K800ethnet &&</userinput> +<userinput>ln -s ../init.d/sysklogd K900sysklogd &&</userinput> +<userinput>ln -s ../init.d/sendsignals S800sendsignals &&</userinput> +<userinput>ln -s ../init.d/mountfs S900mountfs &&</userinput> +<userinput>ln -s ../init.d/reboot S999reboot &&</userinput> +<userinput>cd ../rcS.d &&</userinput> +<userinput>ln -s ../init.d/localnet S100localnet &&</userinput> +<userinput>ln -s ../init.d/checkfs S200checkfs &&</userinput> +<userinput>ln -s ../init.d/mountfs S300mountfs &&</userinput> +<userinput>ln -s ../init.d/setclock S400setclock &&</userinput> +<userinput>ln -s ../init.d/loadkeys S500loadkeys &&</userinput> +<userinput>cd ../rc1.d &&</userinput> +<userinput>ln -s ../init.d/ethnet K800ethnet &&</userinput> +<userinput>ln -s ../init.d/sysklogd K900sysklogd &&</userinput> +<userinput>cd ../rc2.d &&</userinput> +<userinput>ln -s ../init.d/sysklogd S100sysklogd &&</userinput> +<userinput>ln -s ../init.d/ethnet K800ethnet &&</userinput> +<userinput>cd ../rc3.d &&</userinput> +<userinput>ln -s ../init.d/sysklogd S100sysklogd &&</userinput> +<userinput>ln -s ../init.d/ethnet S200ethnet &&</userinput> +<userinput>cd ../rc4.d &&</userinput> +<userinput>ln -s ../init.d/sysklogd S100sysklogd &&</userinput> +<userinput>ln -s ../init.d/ethnet S200ethnet &&</userinput> +<userinput>cd ../rc5.d &&</userinput> +<userinput>ln -s ../init.d/sysklogd S100sysklogd</userinput> +<userinput>ln -s ../init.d/ethnet S200ethnet &&</userinput> +</screen> +</para> </sect1> diff --git a/chapter07/sysklogd.xml b/chapter07/sysklogd.xml index e6a188af0..b794f8fd1 100644 --- a/chapter07/sysklogd.xml +++ b/chapter07/sysklogd.xml @@ -6,7 +6,8 @@ A new file <filename>/etc/init.d/sysklogd</filename> is created containing the following: </para> -<literallayout> +<para> +<screen> <userinput>cat > sysklogd << "EOF"</userinput> #!/bin/sh # Begin /etc/init.d/sysklogd @@ -59,7 +60,8 @@ esac # End /etc/init.d/sysklogd <userinput>EOF</userinput> -</literallayout> +</screen> +</para> </sect1> diff --git a/chapter07/template.xml b/chapter07/template.xml index 6a366b6f8..e4f20c36b 100644 --- a/chapter07/template.xml +++ b/chapter07/template.xml @@ -6,7 +6,8 @@ A new file <filename>/etc/init.d/template</filename> is created containing the following: </para> -<literallayout> +<para> +<screen> <userinput>cat > template << "EOF"</userinput> #!/bin/sh # Begin /etc/init.d/ @@ -52,7 +53,8 @@ esac # End /etc/init.d/ <userinput>EOF</userinput> -</literallayout> +</screen> +</para> </sect1> |