Changeset cedcdaa
- Timestamp:
- Feb 21, 2006, 1:27:06 AM (19 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- 307e31eb
- Parents:
- 6bb43b3
- Location:
- BOOK
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
BOOK/boot/common/settingenviron.xml
r6bb43b3 rcedcdaa 11 11 <title>Setting Up the Environment</title> 12 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 the15 <filename>.bash_profile</filename> file now:</para>13 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 14 href="../final-preps/settingenviron.xml" 15 xpointer="xpointer(//*[@os='a'])"/> 16 16 17 <screen ><userinput>cat > ${LFS}/root/.bash_profile << "EOF"17 <screen os="b"><userinput>cat > ${LFS}/root/.bash_profile << "EOF" 18 18 <literal>PS1='\u:\w\$ ' 19 19 LC_ALL=POSIX … … 22 22 EOF</userinput></screen> 23 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> 24 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 25 href="../final-preps/settingenviron.xml" 26 xpointer="xpointer(//*[@os='h'])"/> 33 27 34 <para >By putting <filename class="directory">/tools/bin</filename> ahead28 <para os="i">By putting <filename class="directory">/tools/bin</filename> ahead 35 29 of the standard <envar>PATH</envar>, all the programs installed in 36 30 <xref linkend="chapter-temporary-tools"/> are picked up by the shell -
BOOK/final-preps/settingenviron.xml
r6bb43b3 rcedcdaa 11 11 <title>Setting Up the Environment</title> 12 12 13 <para >Set up a good working environment by creating two new startup13 <para os="a">Set up a good working environment by creating two new startup 14 14 files for the <command>bash</command> shell. While logged in as user 15 15 <systemitem class="username">lfs</systemitem>, issue the following 16 16 command to create a new <filename>.bash_profile</filename>:</para> 17 17 18 <screen ><userinput>cat > ~/.bash_profile << "EOF"18 <screen os="b"><userinput>cat > ~/.bash_profile << "EOF" 19 19 <literal>exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash</literal> 20 20 EOF</userinput></screen> 21 21 22 <para >When logged on as user <systemitem class="username">lfs</systemitem>,22 <para os="c">When logged on as user <systemitem class="username">lfs</systemitem>, 23 23 the initial shell is usually a <emphasis>login</emphasis> shell which 24 24 reads the <filename>/etc/profile</filename> of the host (probably … … 33 33 technique used here achieves the goal of ensuring a clean environment.</para> 34 34 35 <para >The new instance of the shell is a <emphasis>non-login</emphasis>35 <para os="d">The new instance of the shell is a <emphasis>non-login</emphasis> 36 36 shell, which does not read the <filename>/etc/profile</filename> or 37 37 <filename>.bash_profile</filename> files, but rather reads the … … 39 39 <filename>.bashrc</filename> file now:</para> 40 40 41 <screen ><userinput>cat > ~/.bashrc << "EOF"41 <screen os="e"><userinput>cat > ~/.bashrc << "EOF" 42 42 <literal>set +h 43 43 umask 022 … … 48 48 EOF</userinput></screen> 49 49 50 <para >The <command>set +h</command> command turns off50 <para os=f">The <command>set +h</command> command turns off 51 51 <command>bash</command>'s hash function. Hashing is ordinarily a useful 52 52 feature—<command>bash</command> uses a hash table to remember the … … 60 60 different location.</para> 61 61 62 <para >Setting the user file-creation mask (umask) to 022 ensures that62 <para os="g">Setting the user file-creation mask (umask) to 022 ensures that 63 63 newly created files and directories are only writable by their owner, 64 64 but are readable and executable by anyone (assuming default modes are … … 66 66 mode 644 and directories with mode 755).</para> 67 67 68 <para >The <envar>LFS</envar> variable should be set to the68 <para os="g">The <envar>LFS</envar> variable should be set to the 69 69 chosen mount point.</para> 70 70 71 <para >TO BE REWRITTEN - The <envar>LC_ALL</envar> variable controls71 <para os="h">TO BE REWRITTEN - The <envar>LC_ALL</envar> variable controls 72 72 the localization of 73 73 certain programs, making their messages follow the conventions of a … … 80 80 the chroot environment.</para> 81 81 82 <para >By putting <filename class="directory">/tools/bin</filename> ahead82 <para os="i">By putting <filename class="directory">/tools/bin</filename> ahead 83 83 of the standard <envar>PATH</envar>, all the programs installed in 84 84 <xref linkend="chapter-temp-system"/> are picked up by the shell … … 87 87 the same programs are available in the temporary system.</para> 88 88 89 <para >Finally, to have the environment fully prepared for building the89 <para os="j">Finally, to have the environment fully prepared for building the 90 90 temporary tools, source the just-created user profile:</para> 91 91 92 <screen ><userinput>source ~/.bash_profile</userinput></screen>92 <screen os="k"><userinput>source ~/.bash_profile</userinput></screen> 93 93 94 94 </sect1>
Note:
See TracChangeset
for help on using the changeset viewer.