diff options
author | Xi Ruoyao <xry111@mengyan1223.wang> | 2022-02-05 11:36:39 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@mengyan1223.wang> | 2022-02-05 20:48:27 +0800 |
commit | 490dc15317e18e4f87d2a2555adc6ce2c2a774ba (patch) | |
tree | cdd4f927f4ca62b6cbd3ddc26260015232ba0aaf /chapter07/createfiles.xml | |
parent | 69c4524b6df4f5ac7b87e868afe55569b61752a8 (diff) |
remove "+h" in bash commands in chroot (#4998)
In the new cross-compilation approach, the $PATH in chroot does not
contain '/tools/bin'. So "+h" is useless in chroot as the newly
installed tools always replace the temporary counterpart at the same
location.
"+h" in chapter4/settingenviron.xml is kept deliberately. Currently
$LFS/tools/bin only contains programs prefixed with
"x86_64-lfs-linux-gnu-", and it's highly unlikely that any distro will
ever ship a program named with such prefix. So it may seems that we can
remove this "+h" as well. However, the situation may change in future
and we can take this oppertunity to teach the advantage and disvantage
of bash hash feature.
Diffstat (limited to 'chapter07/createfiles.xml')
-rw-r--r-- | chapter07/createfiles.xml | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/chapter07/createfiles.xml b/chapter07/createfiles.xml index 9c4f6ac54..009806b3f 100644 --- a/chapter07/createfiles.xml +++ b/chapter07/createfiles.xml @@ -184,14 +184,7 @@ install -o tester -d /home/tester</userinput></screen> files have been created, user name and group name resolution will now work:</para> -<screen role="nodump"><userinput>exec /usr/bin/bash --login +h</userinput></screen> - - <para>Note the use of the <parameter>+h</parameter> directive. This tells - <command>bash</command> not to use its internal path hashing. Without this - directive, <command>bash</command> would remember the paths to binaries it has - executed. To ensure the use of the newly compiled binaries as soon as they are - installed, the <parameter>+h</parameter> directive will be used for the duration - of this and the next chapter.</para> +<screen role="nodump"><userinput>exec /usr/bin/bash --login</userinput></screen> <para>The <command>login</command>, <command>agetty</command>, and <command>init</command> programs (and others) use a number of log |