[bf8c11f] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="ch-boot-settingenviron">
|
---|
| 9 | <?dbhtml filename="settingenvironment.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>Setting Up the Environment</title>
|
---|
| 12 |
|
---|
[3c2fa25] | 13 | <para>The new instance of the shell is a <emphasis>non-login</emphasis>
|
---|
| 14 | shell, will read <filename>.bash_profile</filename> file. Create the
|
---|
| 15 | <filename>.bash_profile</filename> file now:</para>
|
---|
[bf8c11f] | 16 |
|
---|
[3c2fa25] | 17 | <screen><userinput>cat > ${LFS}/root/.bash_profile << "EOF"
|
---|
[bf8c11f] | 18 | <literal>PS1='\u:\w\$ '
|
---|
| 19 | LC_ALL=POSIX
|
---|
| 20 | PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin:/tools/sbin
|
---|
| 21 | export LC_ALL PATH PS1</literal>
|
---|
| 22 | EOF</userinput></screen>
|
---|
| 23 |
|
---|
[3c2fa25] | 24 | <para>The <envar>LC_ALL</envar> variable controls the localization of
|
---|
| 25 | certain programs, making their messages follow the conventions of a
|
---|
[351f7ef0] | 26 | specified country.
|
---|
[3c2fa25] | 27 | Setting <envar>LC_ALL</envar> to <quote>POSIX</quote> or <quote>C</quote>
|
---|
| 28 | (the two are equivalent) ensures that everything will work as expected
|
---|
[351f7ef0] | 29 | on your tempoary system.</para>
|
---|
[bf8c11f] | 30 |
|
---|
[3c2fa25] | 31 | <para>By putting <filename class="directory">/tools/bin</filename> at
|
---|
| 32 | the end of the standard <envar>PATH</envar>, all the programs installed in
|
---|
| 33 | <xref linkend="chapter-temporary-tools"/> are only picked up by the shell
|
---|
| 34 | if they have not yet been built on the target system. This configuration
|
---|
| 35 | forces use of the final system binaries as they are built over the
|
---|
| 36 | temporary-tools, minimising the chance final system programs being built
|
---|
| 37 | against the temporary-tools.</para>
|
---|
[bf8c11f] | 38 |
|
---|
| 39 | </sect1>
|
---|