diff options
author | Manuel Canales Esparcia <manuel@linuxfromscratch.org> | 2004-12-20 19:09:48 +0000 |
---|---|---|
committer | Manuel Canales Esparcia <manuel@linuxfromscratch.org> | 2004-12-20 19:09:48 +0000 |
commit | 1d317bbf0530462f7963d100291de7c2775c9c10 (patch) | |
tree | 21e2771d806c2b3510e1cbdab13c84ce7cc655b1 /chapter07 | |
parent | e0a04e86b21514726e2ed072700a2e99022010a6 (diff) |
Removed text in chapter 07.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4440 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter07')
-rw-r--r-- | chapter07/bootscripts.xml | 173 | ||||
-rw-r--r-- | chapter07/console.xml | 72 | ||||
-rw-r--r-- | chapter07/hostname.xml | 8 | ||||
-rw-r--r-- | chapter07/hosts.xml | 29 | ||||
-rw-r--r-- | chapter07/inputrc.xml | 39 | ||||
-rw-r--r-- | chapter07/introduction.xml | 15 | ||||
-rw-r--r-- | chapter07/network.xml | 53 | ||||
-rw-r--r-- | chapter07/profile.xml | 80 | ||||
-rw-r--r-- | chapter07/setclock.xml | 16 | ||||
-rw-r--r-- | chapter07/usage.xml | 94 |
10 files changed, 6 insertions, 573 deletions
diff --git a/chapter07/bootscripts.xml b/chapter07/bootscripts.xml index 15375460f..c8e358326 100644 --- a/chapter07/bootscripts.xml +++ b/chapter07/bootscripts.xml @@ -10,7 +10,6 @@ <indexterm zone="ch-scripts-bootscripts"><primary sortas="a-Bootscripts">Bootscripts</primary></indexterm> <sect2 role="package"><title/> -<para>The LFS-Bootscripts package contains a set of bootscripts.</para> <segmentedlist> <segtitle>&buildtime;</segtitle> @@ -18,10 +17,6 @@ <seglistitem><seg>0.1 SBU</seg><seg>0.3 MB</seg></seglistitem> </segmentedlist> -<segmentedlist> -<segtitle>LFS-Bootscripts installation depends on</segtitle> -<seglistitem><seg>Bash, Coreutils</seg></seglistitem> -</segmentedlist> </sect2> <sect2 role="installation"> @@ -42,173 +37,7 @@ make install-syslog-ng</userinput></screen> <sect2 id="contents-bootscripts" role="content"><title>Contents of LFS-bootscripts</title> -<segmentedlist> -<segtitle>Installed scripts</segtitle> -<seglistitem><seg>checkfs, cleanfs, console, functions, halt, ifdown, ifup, -localnet, mountfs, mountkernfs, network, rc, reboot, sendsignals, setclock, static, -swap, sysklogd and template</seg></seglistitem> -</segmentedlist> - -<variablelist><title>Short descriptions</title> - -<varlistentry id="checkfs-bootscripts"> -<term><command>checkfs</command></term> -<listitem> -<indexterm zone="ch-scripts-bootscripts checkfs-bootscripts"><primary sortas="d-checkfs">checkfs</primary></indexterm> -<para>checks the file systems just before they are mounted (with the exception of journal -and network based file systems).</para> -</listitem> -</varlistentry> - -<varlistentry id="cleanfs-bootscripts"> -<term><command>cleanfs</command></term> -<listitem> -<indexterm zone="ch-scripts-bootscripts cleanfs-bootscripts"><primary sortas="d-cleanfs">cleanfs</primary></indexterm> -<para>removes files that shouldn't be -preserved between reboots, such as those in <filename class="directory">/var/run/</filename> and -<filename class="directory">/var/lock/</filename>. It re-creates <filename>/var/run/utmp</filename> -and removes the possibly present <filename>/etc/nologin</filename>, -<filename>/fastboot</filename> and <filename>/forcefsck</filename> files.</para> -</listitem> -</varlistentry> - -<varlistentry id="console-bootscripts"> -<term><command>console</command></term> -<listitem> -<indexterm zone="ch-scripts-bootscripts console-bootscripts"><primary sortas="d-console">console</primary></indexterm> -<para>loads the keymap table you specified as proper for your keyboard layout. -It also sets the screen font.</para> -</listitem> -</varlistentry> - -<varlistentry id="functions-bootscripts"> -<term><command>functions</command></term> -<listitem> -<indexterm zone="ch-scripts-bootscripts functions-bootscripts"><primary sortas="d-functions">functions</primary></indexterm> -<para>contains functions shared among -different scripts, such as error and status checking.</para> -</listitem> -</varlistentry> - -<varlistentry id="halt-bootscripts"> -<term><command>halt</command></term> -<listitem> -<indexterm zone="ch-scripts-bootscripts halt-bootscripts"><primary sortas="d-halt">halt</primary></indexterm> -<para>halts the system.</para> -</listitem> -</varlistentry> - -<varlistentry id="ifdown-bootscripts"> -<term><command>ifdown</command> and <command>ifup</command></term> -<listitem> -<indexterm zone="ch-scripts-bootscripts ifdown-bootscripts"><primary sortas="d-ifdown">ifdown</primary></indexterm> -<para>assist the network script with network devices.</para> -</listitem> -</varlistentry> - -<varlistentry id="localnet-bootscripts"> -<term><command>localnet</command></term> -<listitem> -<indexterm zone="ch-scripts-bootscripts localnet-bootscripts"><primary sortas="d-localnet">localnet</primary></indexterm> -<para>sets up the system's hostname and local loopback device.</para> -</listitem> -</varlistentry> - -<varlistentry id="mountfs-bootscripts"> -<term><command>mountfs</command></term> -<listitem> -<indexterm zone="ch-scripts-bootscripts mountfs-bootscripts"><primary sortas="d-mountfs">mountfs</primary></indexterm> -<para>mounts all file systems that -aren't marked <emphasis>noauto</emphasis> or aren't network based.</para> -</listitem> -</varlistentry> - -<varlistentry id="mountkernfs-bootscripts"> -<term><command>mountkernfs</command></term> -<listitem> -<indexterm zone="ch-scripts-bootscripts mountkernfs-bootscripts"><primary sortas="d-mountkernfs">mountkernfs</primary></indexterm> -<para>is used to mount kernel-provided file systems, such as <systemitem class="filesystem">proc</systemitem>.</para> -</listitem> -</varlistentry> - -<varlistentry id="network-bootscripts"> -<term><command>network</command></term> -<listitem> -<indexterm zone="ch-scripts-bootscripts network-bootscripts"><primary sortas="d-network">network</primary></indexterm> -<para>sets up network interfaces, such -as network cards, and sets up the default gateway where applicable.</para> -</listitem> -</varlistentry> - -<varlistentry id="rc-bootscripts"> -<term><command>rc</command></term> -<listitem> -<indexterm zone="ch-scripts-bootscripts rc-bootscripts"><primary sortas="d-rc">rc</primary></indexterm> -<para>is the master run-level control script. -It is responsible for running all the other scripts one-by-one, in a sequence -determined by the name of the symbolic links being processed.</para> -</listitem> -</varlistentry> - -<varlistentry id="reboot-bootscripts"> -<term><command>reboot</command></term> -<listitem> -<indexterm zone="ch-scripts-bootscripts reboot-bootscripts"><primary sortas="d-reboot">reboot</primary></indexterm> -<para>reboots the system.</para> -</listitem> -</varlistentry> - -<varlistentry id="sendsignals-bootscripts"> -<term><command>sendsignals</command></term> -<listitem> -<indexterm zone="ch-scripts-bootscripts sendsignals-bootscripts"><primary sortas="d-sendsignals">sendsignals</primary></indexterm> -<para>makes sure every process is terminated before the system reboots or halts.</para> -</listitem> -</varlistentry> - -<varlistentry id="setclock-bootscripts"> -<term><command>setclock</command></term> -<listitem> -<indexterm zone="ch-scripts-bootscripts setclock-bootscripts"><primary sortas="d-setclock">setclock</primary></indexterm> -<para>resets the kernel clock to -localtime in case the hardware clock isn't set to GMT time.</para> -</listitem> -</varlistentry> - -<varlistentry id="static-bootscripts"> -<term><command>static</command></term> -<listitem> -<indexterm zone="ch-scripts-bootscripts static-bootscripts"><primary sortas="d-static">static</primary></indexterm> -<para>provides the functionality needed -to assign a static IP address to a network interface.</para> -</listitem> -</varlistentry> - -<varlistentry id="swap-bootscripts"> -<term><command>swap</command></term> -<listitem> -<indexterm zone="ch-scripts-bootscripts swap-bootscripts"><primary sortas="d-swap">swap</primary></indexterm> -<para>enables and disables swap files and partitions.</para> -</listitem> -</varlistentry> - -<varlistentry id="syslogng-bootscripts"> -<term><command>sysklogd</command></term> -<listitem> -<indexterm zone="ch-scripts-bootscripts syslogng-bootscripts"><primary sortas="d-syslogng">syslog-ng</primary></indexterm> -<para>starts and stops the system and kernel log daemons.</para> -</listitem> -</varlistentry> - -<varlistentry id="template-bootscripts"> -<term><command>template</command></term> -<listitem> -<indexterm zone="ch-scripts-bootscripts template-bootscripts"><primary sortas="d-template">template</primary></indexterm> -<para>is a template you can use to -create your own bootscripts for your other daemons.</para> -</listitem> -</varlistentry> -</variablelist> +<para>See testing</para> </sect2> diff --git a/chapter07/console.xml b/chapter07/console.xml index dd6103f51..9469cc94a 100644 --- a/chapter07/console.xml +++ b/chapter07/console.xml @@ -11,66 +11,11 @@ <primary sortas="d-console">console</primary> <secondary>configuring</secondary></indexterm> -<para>In this section we will configure the <command>console</command> -initscript that sets up the keyboard -map and the console font. If you -don't need to use any non-ASCII characters -(British pound and Euro character are not ASCII), -and your keyboard is a US one, you can skip this section. -Without the configuration file, -the <command>console</command> initscript will do nothing.</para> - -<para>The <command>console</command> script uses the -<filename>/etc/sysconfig/console</filename> -as a configuration file. You need to decide which keymap and screen font you -will use. The language-specific HOWTO can help you. -A pre-made -<filename>/etc/sysconfig/console</filename> file with known -good settings for several countries was installed with the LFS-Bootscripts -package, and you just have to uncomment -the relevant section if your country is supported (but read the rest -of this section anyway). -If still in doubt, -look into <filename class="directory">/usr/share/kbd</filename> -for valid keymaps and screen fonts. Then read the <command>loadkeys</command> -and <command>setfont</command> manual pages and figure out the correct -arguments for these programs. -Once you decided, create the -configuration file with the following command:</para> - <screen><userinput>cat >/etc/sysconfig/console <<"EOF" KEYMAP="<replaceable>[arguments for loadkeys]</replaceable>" FONT="<replaceable>[arguments for setfont]</replaceable>" EOF</userinput></screen> -<para>E.g., for Spanish users who also want to use the Euro character -(accessible by pressing AltGr+E), -the following settings are correct:</para> - -<screen><userinput>cat >/etc/sysconfig/console <<"EOF" -KEYMAP="es euro2" -FONT="lat9-16 -u iso01" -EOF</userinput></screen> - -<note><para>The FONT line above is correct only for the ISO-8859-15 -character set. If you prefer ISO-8859-1 and therefore use a pound sign -instead of Euro, the correct FONT line is:</para> - -<screen><userinput>FONT="lat1-16"</userinput></screen></note> - -<para>If the KEYMAP or FONT variable is not set, the -<command>console</command> initscript will not run the corresponding -program.</para> - -<para>In some keymaps, the Backspace and Delete keys send characters -different form ones in the default keymap built into the kernel. -This confuses some applications, e.g., <application>Emacs</application> -displays its help (instead of erasing the character before the cursor) -when you press Backspace. To check if your keymap is affected (this works -only for i386 keymaps):</para> - -<screen><userinput>zgrep '\W14\W' <replaceable>[/path/to/your/keymap]</replaceable></userinput></screen> - <para>If you see that keycode 14 is Backspace and not Delete, create the following keymap snippet to fix this issue:</para> @@ -91,22 +36,5 @@ after the main keymap:</para> KEYMAP_CORRECTION="/etc/kbd/bs-sends-del" EOF</userinput></screen> -<para>If you want to compile your keymap directly into the kernel instead of -setting it every time from the <command>console</command> bootscript, then -instructions are given in <xref linkend="ch-bootable-kernel"/>. Doing this -ensures that your keyboard will always work as expected, even when you boot into -maintenance mode (by passing <parameter>init=/bin/sh</parameter> to the kernel), -as in that situation, the <command>console</command> bootscript won't be run. -Additionally, the kernel will not set the screen font automatically. Again, -this shouldn't pose too many problems as ASCII characters will still be handled -correctly, and it is unlikely that you would need to rely on non-ASCII -characters whilst in maintenance mode.</para> - -<para>Since the kernel will set up the keymap, you can omit the KEYMAP variable -from the <filename>/etc/sysconfig/console</filename> configuration file. If you -wish, you can still have it, this isn't going to hurt you. Keeping it could even -be beneficial, in case you run a lot of different kernels and can't be sure that -the keymap is compiled into every one of them.</para> - </sect1> diff --git a/chapter07/hostname.xml b/chapter07/hostname.xml index 9320fee1d..f51f08a62 100644 --- a/chapter07/hostname.xml +++ b/chapter07/hostname.xml @@ -11,17 +11,9 @@ <primary sortas="d-localnet">localnet</primary> <secondary>configuring</secondary></indexterm> -<para>Part of the localnet script is setting up the system's hostname. This -needs to be configured in the <filename>/etc/sysconfig/network</filename>.</para> - <para>Create the <filename>/etc/sysconfig/network</filename> file and enter a hostname by running:</para> <screen><userinput>echo "HOSTNAME=<replaceable>[lfs]</replaceable>" > /etc/sysconfig/network</userinput></screen> -<para><replaceable>[lfs]</replaceable> needs to be replaced with the name the computer is -to be called. You should not enter the FQDN (Fully Qualified Domain -Name) here. That information will be put in the -<filename>/etc/hosts</filename> file later on.</para> - </sect1> diff --git a/chapter07/hosts.xml b/chapter07/hosts.xml index a9cbd4b3e..b945d9c21 100644 --- a/chapter07/hosts.xml +++ b/chapter07/hosts.xml @@ -17,30 +17,6 @@ <primary sortas="d-network">network</primary> <secondary>/etc/hosts</secondary></indexterm> -<para>If a network card is to be configured, you have to decide on the -IP-address, FQDN and possible aliases for use in the <filename>/etc/hosts</filename> file. The -syntax is:</para> - -<screen><IP address> myhost.example.org aliases</screen> - -<para>Unless your computer is to be visible to the Internet (e.g., you have a -registered domain and a valid block of assigned IP addresses - most of us don't -have this) you should make sure that the IP-address is in the private network -IP-address range. Valid ranges are:</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</screen> - -<para>A valid IP address could be 192.168.1.1. A valid FQDN for this IP could -be www.linuxfromscratch.org (not recommended as this is a valid registered domain -address and could cause your domain name server problems).</para> - -<para>If you aren't going to use a network card, you still need to -come up with a FQDN. This is necessary for certain programs to operate -correctly.</para> - <para>If a network card is not going to be configured, create the <filename>/etc/hosts</filename> file by running:</para> @@ -64,9 +40,4 @@ EOF</userinput></screen> # End /etc/hosts (network card version) EOF</userinput></screen> -<para>Of course, the <replaceable>[192.168.1.1]</replaceable> and <replaceable>[<value of HOSTNAME>.example.org]</replaceable> -have to be changed to your liking (or requirements if assigned an IP-address -by a network/system administrator and this machine is planned to be connected -to an existing network).</para> - </sect1> diff --git a/chapter07/inputrc.xml b/chapter07/inputrc.xml index 977e9755f..2f8a33912 100644 --- a/chapter07/inputrc.xml +++ b/chapter07/inputrc.xml @@ -9,45 +9,6 @@ <indexterm zone="ch-scripts-inputrc"><primary sortas="e-/etc/inputrc">/etc/inputrc</primary></indexterm> -<para><filename>/etc/inputrc</filename> deals with the mapping of the keyboard for -certain situations. This file is the start-up file used by -<application>readline</application> - the input related library used by -<application>Bash</application> and most other shells.</para> - -<para>For more information see <command>info bash</command> -- <emphasis -role="strong">Node: Readline Init</emphasis> file as well as -<command>info readline</command>. There is a lot that can be done with this -one rc file.</para> - -<para>Global values are set in <filename>/etc/inputrc</filename>. -Personal user values are set in <filename>~/.inputrc</filename>. The -<filename>~/.inputrc</filename> file will override the global settings -file. A later page sets up <application>Bash</application> to use -<filename>/etc/inputrc</filename> if there is no -<filename>.inputrc</filename> for a user when -<filename>/etc/profile</filename> is read (usually at login). If you -want your system to use both, or don't want <emphasis>global</emphasis> -keyboard handling, it is a good idea to place a default -<filename>.inputrc</filename> into the <filename class="directory">/etc/skel</filename> -directory for use with new users.</para> - -<para> -Below is a base <filename>/etc/inputrc</filename> along with -comments to explain what the various options do. Note that comments -can <emphasis>not</emphasis> be on the same line as commands. -</para> - -<para>If you will create an <filename>.inputrc</filename> in -<filename class="directory">/etc/skel</filename> using the command below, change the -command's output to <filename>/etc/skel/.inputrc</filename> and be -sure to check/set permissions afterward. Then you can just copy that -file to <filename>/etc/inputrc</filename> and the home directory -of any user already existing in the system, including root, that needs -a private version of the file. Be sure to use the <parameter>-p</parameter> parameter -of <command>cp</command> to maintain permissions and be sure to change owner and group -appropriately. -</para> - <screen><userinput>cat > /etc/inputrc << "EOF" # Begin /etc/inputrc diff --git a/chapter07/introduction.xml b/chapter07/introduction.xml index 9f1343c54..144cdfce4 100644 --- a/chapter07/introduction.xml +++ b/chapter07/introduction.xml @@ -7,19 +7,6 @@ <title>Introduction</title> <?dbhtml filename="introduction.html"?> -<para>In this chapter we will install the bootscripts and set them up -properly. Most of these scripts will work without needing to modify them, but -a few require additional configuration files, since they deal with hardware -dependent information.</para> - -<para>We have chosen to use System-V style init scripts simply because they -are widely used and we feel comfortable with them. If you would prefer to try -something else: Marc Heerdink has written a hint about BSD style init scripts, -to be found at <ulink url="&hints-root;bsd-init.txt"/>. And if you'd like -something more radical, search the LFS mailing lists for <quote>depinit</quote>. -</para> - -<para>If you decide to use some other style of init scripts, you can skip this -chapter and move on to <xref linkend="chapter-bootable"/>.</para> +<para>See testing</para> </sect1> diff --git a/chapter07/network.xml b/chapter07/network.xml index 8ccb09318..44e5ad01b 100644 --- a/chapter07/network.xml +++ b/chapter07/network.xml @@ -11,31 +11,10 @@ <primary sortas="d-network">network</primary> <secondary>configuring</secondary></indexterm> -<para>This section only applies if you're going to configure a network -card.</para> - -<para>If you don't have any network cards, you are most likely not going to -create any configuration files relating to network cards. If that is the -case, you must remove the <filename class="symlink">network</filename> symlinks from all the -run-level directories -(<filename class="directory">/etc/rc.d/rc*.d</filename>)</para> - <sect2> <title>Creating network interface configuration files</title> -<para>Which interfaces are brought up and down by the network script depends on -the files in the <filename class="directory">/etc/sysconfig/network-devices</filename> directory. This -directory should contain subdirectories in the form of -<filename>ifconfig.xyz</filename>, where <quote>xyz</quote> is a network -interface name (such as eth0)</para> - -<para>If you decide to rename or move this -<filename class="directory">/etc/sysconfig/network-devices</filename> directory, -make sure you update the <filename>/etc/sysconfig/rc</filename> file as well and -update the <quote>network_devices</quote> by providing it with the new path.</para> - -<para>Now, new files are created in that directory. The following command -creates a sample <filename>ipv4</filename> file for the +<para>The following command creates a sample <filename>ipv4</filename> file for the <filename>eth0</filename> device:</para> <screen><userinput>cd /etc/sysconfig/network-devices && @@ -49,35 +28,13 @@ PREFIX=24 BROADCAST=192.168.1.255 EOF</userinput></screen> -<para>Of course, the values of those variables have to be changed in every file -to match the proper setup. If the ONBOOT variable is set to <quote>yes</quote>, -the network script will bring up the equivalent interface during the booting of -the system. If set to anything but <quote>yes</quote>, the equivalent interface -will be ignored by the network script and not brought up.</para> - -<para>The SERVICE entry defines the method of obtaining the IP address. The LFS -bootscripts have a modular IP assignment format, and by creating additional -files in -<filename class="directory">/etc/sysconfig/network-devices/services</filename>, -you can allow other IP assignment methods. This would commonly be used if you -need DHCP, which is addressed in the BLFS book.</para> - -<para>Of course, GATEWAY should contain the IP of your default gateway, if you -have one. If not, then don't include the GATEWAY line in the configuration -file.</para> - </sect2> <sect2 id="resolv.conf"> <title>Creating the /etc/resolv.conf file</title> <indexterm zone="resolv.conf"><primary sortas="e-/etc/resolv.conf">/etc/resolv.conf</primary></indexterm> -<para>If you're going to be connected to the Internet then most likely you'll -need some means of DNS name resolution to resolve Internet domain names to IP -addresses. This is best achieved by placing the IP address of your assigned DNS -resolver, available from your ISP (Internet Service Provider) or network -administrator, into <filename>/etc/resolv.conf</filename>. Create the file by -running the following:</para> +<para>Create the file by running the following:</para> <screen><userinput>cat > /etc/resolv.conf << "EOF" # Begin /etc/resolv.conf @@ -88,12 +45,6 @@ nameserver <replaceable>[IP address of your nameserver]</replaceable> # End /etc/resolv.conf EOF</userinput></screen> -<para>Of course, replace -<replaceable>[IP address of your nameserver]</replaceable> with the IP address -of the DNS resolver assigned for your use. There will often be more than one -entry (requirements demand secondary servers for fallback capability). The IP -address may even be a router on your local network.</para> - </sect2> </sect1> diff --git a/chapter07/profile.xml b/chapter07/profile.xml index 35bb9e70c..5bf3c281c 100644 --- a/chapter07/profile.xml +++ b/chapter07/profile.xml @@ -9,71 +9,7 @@ <indexterm zone="ch-scripts-profile"><primary sortas="e-/etc/profile">/etc/profile</primary></indexterm> -<para>The shell program <command>/bin/bash</command> (hereafter -referred to as just <quote>the shell</quote>) uses a collection of startup files to -help create an environment to run in. Each file has a specific use and -may affect login and interactive environments differently. The files in -the <filename class="directory">/etc</filename> directory generally provide global -settings. If an equivalent file exists in your home directory it may -override the global settings. -</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> -- -<emphasis role="strong">Nodes: Bash Startup Files and Interactive -Shells.</emphasis></para> - -<para>The files <filename>/etc/profile</filename> and -<filename>~/.bash_profile</filename> are read when the shell is invoked -as an interactive login shell.</para> - -<para>A base <filename>/etc/profile</filename> created below sets some -environment variables necessary for native language support. By setting them -properly, you get: -</para> -<itemizedlist> -<listitem><para>the output of programs translated into your native -language;</para></listitem> -<listitem><para>correct classification of characters into letters, digits and -other classes - this is necessary for Bash to accept non-ASCII characters -in command lines properly in non-English locales;</para></listitem> -<listitem><para>the alphabetical sorting order correct for your -country;</para></listitem> -<listitem><para>good default paper size;</para></listitem> -<listitem><para>correct formatting of monetary, time and date -values.</para></listitem> -</itemizedlist> - -<para>This script also sets the INPUTRC environment variable that makes -<application>Bash</application> and <application>Readline</application> use -the <filename>/etc/inputrc</filename> file we created earlier.</para> - -<para>Replace <replaceable>[ll]</replaceable> below with the -two-letter code for your language (e.g., <quote>en</quote>) and -<replaceable>[CC]</replaceable> with the two-letter code for your country -(e.g., <quote>GB</quote>). Also you may need to specify -(and this is actually the preferred form) your -character encoding (e.g. <quote>iso8859-1</quote>) after a dot -(so that the result is <quote>en_GB.iso8859-1</quote>). -Issue the following command for more information:</para> - -<screen><userinput>man 3 setlocale</userinput></screen> - -<para>The list of all locales supported by Glibc can be obtained by running -the following command:</para> - -<screen><userinput>locale -a</userinput></screen> - -<para>Now, when you are sure about your locale settings, create the -<filename>/etc/profile</filename> file:</para> +<para>Create the <filename>/etc/profile</filename> file:</para> <screen><userinput>cat > /etc/profile << "EOF" # Begin /etc/profile @@ -85,18 +21,4 @@ export INPUTRC=/etc/inputrc # End /etc/profile EOF</userinput></screen> -<note><para>The <quote>C</quote> (default) and <quote>en_US</quote> -(the recommended one for US English users) locales are -different.</para></note> - -<para>Setting the keyboard layout, -the screen font and the locale-related environment variables -are the only internationalization steps needed to support -locales that use ordinary single-byte encodings and left-to-right -writing direction. More complex cases (including UTF-8 based locales) -require additional steps and additional patches because many applications -tend to break in such conditions. Because of too little educational -value for a typical reader, these steps and patches are not included -in the LFS book and such locales are not supported by LFS in any way. -</para> </sect1> diff --git a/chapter07/setclock.xml b/chapter07/setclock.xml index ad794cb9e..fd15f66de 100644 --- a/chapter07/setclock.xml +++ b/chapter07/setclock.xml @@ -11,17 +11,6 @@ <primary sortas="d-setclock">setclock</primary> <secondary>configuring</secondary></indexterm> -<para>This <command>setclock</command> script reads the time from your hardware clock, also -known as BIOS or CMOS (Complementry Metal-Oxide Semiconductor) clock, and either converts that time to localtime -using the <filename>/etc/localtime</filename> file (if the hardware clock -is set to GMT) or not (if the hardware clock is already set to localtime). -There is no way to auto-detect whether the hardware clock is set to GMT or -not, so we need to configure that here ourselves.</para> - -<para>Change the value of the <emphasis>UTC</emphasis> variable below to a -<parameter>0</parameter> (zero) if your hardware clock is not set to GMT -time.</para> - <para>Create a new file <filename>/etc/sysconfig/clock</filename> by running the following:</para> @@ -33,9 +22,4 @@ UTC=1 # End /etc/sysconfig/clock EOF</userinput></screen> -<para>Now, you may want to take a look at a very good hint explaining how we -deal with time on LFS at <ulink url="&hints-root;time.txt"/>. -It explains issues such as time zones, UTC, and the TZ environment -variable.</para> - </sect1> diff --git a/chapter07/usage.xml b/chapter07/usage.xml index 6893762ba..9382a7226 100644 --- a/chapter07/usage.xml +++ b/chapter07/usage.xml @@ -11,98 +11,6 @@ <primary sortas="a-Bootscripts">Bootscripts</primary> <secondary>usage</secondary></indexterm> -<para>Linux uses a special booting facility named SysVinit. It's based on a -concept of <emphasis>run-levels</emphasis>. It can be widely different -from one system to another, so it can't be assumed that because things -worked in <insert distro name> they should work like that in LFS -too. LFS has its own way of doing things, but it respects generally -accepted standards.</para> - -<para>SysVinit (which we'll call <emphasis>init</emphasis> from now on) works -using a run-levels scheme. There are 7 (from 0 to 6) run-levels -(actually, there are more run-levels but they are for special cases and -generally not used. The <command>init</command> man page describes those details), and each -one of those corresponds to the things the computer is supposed to do when -it starts up. The default run-level is 3. Here are the descriptions of the -different run-levels as they are often implemented:</para> - -<literallayout>0: halt the computer -1: single-user mode -2: multi-user mode without networking -3: multi-user mode with networking -4: reserved for customization, otherwise does the same as 3 -5: same as 4, it is usually used for GUI login (like X's xdm or KDE's kdm) -6: reboot the computer</literallayout> - -<para>The command used to change run-levels is <command>init -<runlevel></command> where <runlevel> is the target run-level. For -example, to reboot the computer, a user would issue the <userinput>init -6</userinput> command. The <command>reboot</command> command is just an alias for -it, as is the <command>halt</command> command an alias for <command>init -0</command>.</para> - -<para>There are a number of directories under <filename class="directory">/etc/rc.d</filename> -that look like like <filename class="directory">rc?.d</filename> (where ? is the -number of the run-level) and <filename class="directory">rcsysinit.d</filename> -all containing a number of symbolic links. Some begin with a K, the others begin -with an S, and all of them have two numbers following the initial letter. The K -means to stop (kill) a service, and the S means to start a service. The numbers -determine the order in which the scripts are run, from 00 to 99; the lower the -number the sooner it gets executed. When init switches to another run-level, the -appropriate services get killed and others get started.</para> - -<para>The real scripts are in <filename class="directory">/etc/rc.d/init.d</filename>. -They do all the work, and the symlinks all point to them. Killing links and starting links -point to the same script in <filename class="directory">/etc/rc.d/init.d</filename>. -That's because the scripts can be called with different parameters like -<parameter>start</parameter>, <parameter>stop</parameter>, -<parameter>restart</parameter>, <parameter>reload</parameter>, -<parameter>status</parameter>. When a K link is encountered, the appropriate -script is run with the <parameter>stop</parameter> argument. When an S link is -encountered, the appropriate script is run with the <parameter>start</parameter> -argument.</para> - -<para>There is one exception. Links that start with an S in the -rc0.d and rc6.d directories will not cause anything to be started. They -will be called with the parameter <parameter>stop</parameter> to stop -something. The logic behind it is that when you are going to reboot or -halt the system, you don't want to start anything, only stop the -system.</para> - -<para>These are descriptions of what the arguments make the -scripts do:</para> - -<variablelist> -<varlistentry> -<term><parameter>start</parameter></term> -<listitem><para>The service is started.</para></listitem> -</varlistentry> - -<varlistentry> -<term><parameter>stop</parameter></term> -<listitem><para>The service is stopped.</para></listitem> -</varlistentry> - -<varlistentry> -<term><parameter>restart</parameter></term> -<listitem><para>The service is stopped and then started again.</para></listitem> -</varlistentry> - -<varlistentry> -<term><parameter>reload</parameter></term> -<listitem><para>The configuration of the service is updated. -This is used after the configuration file of a service was modified, when -the service doesn't need to be restarted.</para></listitem> -</varlistentry> - -<varlistentry> -<term><parameter>status</parameter></term> -<listitem><para>Tells if the service is running and with which PIDs.</para></listitem> -</varlistentry> -</variablelist> - -<para>Feel free to modify the way the boot process works (after all, it's your -own LFS system). The files given here are just an example of how it can be -done in a nice way (well, what we consider nice -- you may hate it).</para> +<para>See testing</para> </sect1> |