diff options
author | Greg Schafer <greg@linuxfromscratch.org> | 2003-12-12 01:43:31 +0000 |
---|---|---|
committer | Greg Schafer <greg@linuxfromscratch.org> | 2003-12-12 01:43:31 +0000 |
commit | 07ecae2532085c0c63a2f915679ef75a9ab27a15 (patch) | |
tree | ee92efb87ceb3b44446a454981a09adf1135bf11 | |
parent | 6213d4cc4821f799a803008b65f7df0243550e15 (diff) |
Fixed Bash startup files to handle HOME and PS1.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3132 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
-rw-r--r-- | chapter01/changelog.xml | 3 | ||||
-rw-r--r-- | chapter05/chapter05.xml | 21 | ||||
-rw-r--r-- | index.xml | 4 |
3 files changed, 16 insertions, 12 deletions
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 07ed16a59..2ca887fbe 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -45,6 +45,9 @@ </itemizedlist> </listitem> +<listitem><para>December 11th, 2003 [greg]: Chapter 5: - Setting up the +environment: Fixed Bash startup files to handle HOME and PS1.</para></listitem> + <listitem><para>December 3rd, 2003 [greg]: Upgraded to Gettext-0.13, Man-pages-1.64, Linux-2.4.23 and Psmisc-21.4.</para></listitem> diff --git a/chapter05/chapter05.xml b/chapter05/chapter05.xml index 6ae7a7d4f..5b7a35970 100644 --- a/chapter05/chapter05.xml +++ b/chapter05/chapter05.xml @@ -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> @@ -3,8 +3,8 @@ "/usr/share/docbook/docbookx.dtd" [ -<!ENTITY version "CVS-20031203"> -<!ENTITY releasedate "December 3rd, 2003"> +<!ENTITY version "CVS-20031211"> +<!ENTITY releasedate "December 11th, 2003"> <!ENTITY milestone "5.1"> <!ENTITY nbsp " "> |