|
@@ -352,17 +352,18 @@ startup files for the Bash shell. While logged in as user
|
|
|
<filename>.bash_profile</filename>:</para>
|
|
|
|
|
|
<screen><userinput>cat > ~/.bash_profile << "EOF"</userinput>
|
|
|
-exec env -i TERM=$TERM /bin/bash
|
|
|
+exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
|
|
|
<userinput>EOF</userinput></screen>
|
|
|
|
|
|
-<para>The <userinput>exec env -i TERM=$TERM /bin/bash</userinput> command
|
|
|
-creates a new instance of Bash with a completely empty environment, except for
|
|
|
-the TERM variable. This is needed to ensure that no unwanted and potentially
|
|
|
-hazardous environment variables from the host system leak into our build
|
|
|
-environment. The technique used here is a little non-standard but it achieves
|
|
|
-the goal of enforcing a clean environment. By way of explanation, the initial
|
|
|
-shell is a <emphasis>login</emphasis> shell which reads the
|
|
|
-<filename>.bash_profile</filename>. The new shell instance is a
|
|
|
+<para>The
|
|
|
+<userinput>exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash</userinput>
|
|
|
+command creates a new instance of Bash with a completely empty environment,
|
|
|
+except for the HOME, TERM and PS1 variables. This is needed to ensure that no
|
|
|
+unwanted and potentially hazardous environment variables from the host system
|
|
|
+leak into our build environment. The technique used here is a little
|
|
|
+non-standard but it achieves the goal of enforcing a clean environment. By way
|
|
|
+of explanation, the initial shell is a <emphasis>login</emphasis> shell which
|
|
|
+reads the <filename>.bash_profile</filename>. The new shell instance is a
|
|
|
<emphasis>non-login</emphasis> shell which reads the
|
|
|
<filename>.bashrc</filename> (created next).</para>
|
|
|
|
|
@@ -391,7 +392,7 @@ the newest available version during the build process.</para>
|
|
|
<para>Setting the user file-creation mask to 022 ensures that newly created
|
|
|
files and directories are only writable for their owner, but readable and
|
|
|
executable for anyone.</para>
|
|
|
-
|
|
|
+
|
|
|
<para>The LFS variable should of course be set to the mount point you
|
|
|
chose.</para>
|
|
|
|