| 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 | 
 | 
|---|
| 13 |   <para>The new instance of the shell that will start when the system is booted is a <emphasis>login</emphasis>
 | 
|---|
| 14 |   shell, which will read <filename>.bash_profile</filename> file. Create the
 | 
|---|
| 15 |   <filename>.bash_profile</filename> file now:</para>
 | 
|---|
| 16 | 
 | 
|---|
| 17 | <screen><userinput>cat > ${LFS}/root/.bash_profile << "EOF"
 | 
|---|
| 18 | <literal>set +h
 | 
|---|
| 19 | PS1='\u:\w\$ '
 | 
|---|
| 20 | LC_ALL=POSIX
 | 
|---|
| 21 | PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin:/tools/sbin
 | 
|---|
| 22 | export LC_ALL PATH PS1</literal>
 | 
|---|
| 23 | EOF</userinput></screen>
 | 
|---|
| 24 | 
 | 
|---|
| 25 |   <para>The <envar>LC_ALL</envar> variable controls the localization of
 | 
|---|
| 26 |   certain programs, making their messages follow the conventions of a
 | 
|---|
| 27 |   specified country. 
 | 
|---|
| 28 |   Setting <envar>LC_ALL</envar> to <quote>POSIX</quote> or <quote>C</quote>
 | 
|---|
| 29 |   (the two are equivalent) ensures that everything will work as expected
 | 
|---|
| 30 |   on your temporary system.</para>
 | 
|---|
| 31 | 
 | 
|---|
| 32 |   <para>By putting <filename class="directory">/tools/bin</filename> at
 | 
|---|
| 33 |   the end of the standard <envar>PATH</envar>, all the programs installed in
 | 
|---|
| 34 |   <xref linkend="chapter-temp-system"/> are only picked up by the shell
 | 
|---|
| 35 |   if they have not yet been built on the target system. This configuration
 | 
|---|
| 36 |   forces use of the final system binaries as they are built over the 
 | 
|---|
| 37 |   temp-system, minimising the chance of final system programs being built
 | 
|---|
| 38 |   against the temp-system.</para>
 | 
|---|
| 39 | 
 | 
|---|
| 40 | </sect1>
 | 
|---|