environment: make bash.bashrc note more clear

Decorate usernames with XML labels.
Modify the command so it only applies to systems with bash.bashrc.
Correct the time point which we stop to use lfs user.
Tell the audience that bash.bashrc is useless on LFS.



git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11973 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Xi Ruoyao 2020-06-22 07:47:08 +00:00
parent 686c88ba6b
commit 3a38c46bd2

View File

@ -157,17 +157,25 @@ EOF</userinput></screen>
<para>Several commercial distributions add a non-documented instantiation <para>Several commercial distributions add a non-documented instantiation
of <filename>/etc/bash.bashrc</filename> to the initialization of of <filename>/etc/bash.bashrc</filename> to the initialization of
<command>bash</command>. This file has the potential to modify the lfs <command>bash</command>. This file has the potential to modify the
<systemitem class="username">lfs</systemitem>
user's envirnment in ways that can affect the building of critical LFS user's envirnment in ways that can affect the building of critical LFS
packages. To make sure the lfs user's envronment is clean, check for the packages. To make sure the <systemitem class="username">lfs</systemitem>
user's envronment is clean, check for the
presence of <filename>/etc/bash.bashrc</filename> and, if present, move it presence of <filename>/etc/bash.bashrc</filename> and, if present, move it
out of the way. As the root user, run:</para> out of the way. As the <systemitem class="username">root</systemitem>
user, run:</para>
<screen role="nodump"><userinput>mv -v /etc/bash.bashrc /etc/bash.bashrc.NOUSE</userinput></screen> <screen role="nodump"><userinput>[ ! -e /etc/bash.bashrc ] || mv -v /etc/bash.bashrc /etc/bash.bashrc.NOUSE</userinput></screen>
<para>After use of the lfs user is finished at the end of <xref <para>After use of the lfs user is finished at the beginning of <xref
linkend="chapter-chroot-temporary-tools"/>, you can restore linkend="chapter-chroot-temporary-tools"/>, you can restore
<filename>/etc/bash.bashrc</filename> (if desired).</para> <filename>/etc/bash.bashrc</filename> (if desired).</para>
<para>Note that the LFS Bash package we will build in
<xref linkend="ch-system-bash"/> is not configured to load or execute
<filename>/etc/bash.bashrc</filename>, so this file is useless on a
completed LFS system.</para>
</important> </important>
<para>Finally, to have the environment fully prepared for building the <para>Finally, to have the environment fully prepared for building the