source: boot/common/settingenviron.xml@ 806c539

Last change on this file since 806c539 was bf8c11f, checked in by Jim Gifford <clfs@…>, 19 years ago

r627@server (orig r625): jim | 2005-10-31 12:59:34 -0800
Import of Cross-LFS Book

  • Property mode set to 100644
File size: 1.8 KB
Line 
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 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>
16
17<screen><userinput>cat &gt; ${LFS}/root/.bash_profile &lt;&lt; "EOF"
18<literal>PS1='\u:\w\$ '
19LC_ALL=POSIX
20PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin:/tools/sbin
21export LC_ALL PATH PS1</literal>
22EOF</userinput></screen>
23
24 <para>The <envar>LC_ALL</envar> variable controls the localization of
25 certain programs, making their messages follow the conventions of a
26 specified country. If the host system uses a version of Glibc older
27 than 2.2.4, having <envar>LC_ALL</envar> set to something other than
28 <quote>POSIX</quote> or <quote>C</quote> (during this chapter) may cause
29 issues if you exit the chroot environment and wish to return later.
30 Setting <envar>LC_ALL</envar> to <quote>POSIX</quote> or <quote>C</quote>
31 (the two are equivalent) ensures that everything will work as expected
32 in the chroot environment.</para>
33
34 <para>By putting <filename class="directory">/tools/bin</filename> ahead
35 of the standard <envar>PATH</envar>, all the programs installed in
36 <xref linkend="chapter-temporary-tools"/> are picked up by the shell
37 immediately after their installation. This, combined with turning off
38 hashing, limits the risk that old programs from the host are being used
39 when they should not be used any longer.</para>
40
41</sect1>
Note: See TracBrowser for help on using the repository browser.