<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;
]>

<sect1 id="ch-boot-settingenviron">
  <?dbhtml filename="settingenvironment.html"?>

  <title>Setting Up the Environment</title>

  <para>The new instance of the shell that will start when the system is booted is a <emphasis>login</emphasis>
  shell, which will read <filename>.bash_profile</filename> file. Create the
  <filename>.bash_profile</filename> file now:</para>

<screen><userinput>cat &gt; ${CLFS}/root/.bash_profile &lt;&lt; "EOF"
<literal>set +h
PS1='\u:\w\$ '
LC_ALL=POSIX
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin:/tools/sbin
export LC_ALL PATH PS1</literal>
EOF</userinput></screen>

  <para>The <envar>LC_ALL</envar> variable controls the localization of
  certain programs, making their messages follow the conventions of a
  specified country. 
  Setting <envar>LC_ALL</envar> to <quote>POSIX</quote> or <quote>C</quote>
  (the two are equivalent) ensures that everything will work as expected
  on your temporary system.</para>

  <para>By putting <filename class="directory">/tools/bin</filename> at
  the end of the standard <envar>PATH</envar>, all the programs installed in
  <xref linkend="chapter-temp-system"/> are only picked up by the shell
  if they have not yet been built on the target system. This configuration
  forces use of the final system binaries as they are built over the 
  temp-system, minimising the chance of final system programs being built
  against the temp-system.</para>

</sect1>
