aboutlfs: Also mention umask in addition to export LFS= for bash profiles

This commit is contained in:
Xi Ruoyao 2025-01-12 11:43:36 +08:00
parent 68b56a3c33
commit 625969c2de
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3

View File

@ -57,24 +57,26 @@
given earlier on this page to set <envar>$LFS</envar> to the correct given earlier on this page to set <envar>$LFS</envar> to the correct
directory name and set umask to <literal>022</literal>.</para></caution> directory name and set umask to <literal>022</literal>.</para></caution>
<note><para>One way to ensure that the <envar>LFS</envar> variable is always <note><para>One way to ensure that the <envar>LFS</envar> variable and the
set is to edit the <filename>.bash_profile</filename> file in both your umask are always set properly is to edit the
personal home directory and in <filename>/root/.bash_profile</filename> and <filename>.bash_profile</filename> file in both your personal home
enter the export command above. In addition, the shell specified in the directory and in <filename>/root/.bash_profile</filename> and
enter the <command>export</command> and <command>umask</command> commands
above. In addition, the shell specified in the
<filename>/etc/passwd</filename> file for all users that need the <filename>/etc/passwd</filename> file for all users that need the
<envar>LFS</envar> variable must be bash to ensure that the <envar>LFS</envar> variable must be bash to ensure that the
<filename>/root/.bash_profile</filename> file is incorporated as a part of <filename>.bash_profile</filename> file is incorporated as a part of
the login process.</para> the login process.</para>
<para>Another consideration is the method that is used to log into the <para>Another consideration is the method that is used to log into the
host system. If logging in through a graphical display manager, the host system. If logging in through a graphical display manager, the
user's <filename>.bash_profile</filename> is not normally used when user's <filename>.bash_profile</filename> is not normally used when
a virtual terminal is started. In this case, add the export command to a virtual terminal is started. In this case, add the commands to
the <filename>.bashrc</filename> file for the user and the <filename>.bashrc</filename> file for the user and
<systemitem class="username">root</systemitem>. In addition, <systemitem class="username">root</systemitem>. In addition,
some distributions use an "if" test, and do not run the remaining <filename>.bashrc</filename> some distributions use an "if" test, and do not run the remaining <filename>.bashrc</filename>
instructions for a non-interactive bash invocation. Be sure to place the instructions for a non-interactive bash invocation. Be sure to place the
export command ahead of the test for non-interactive use.</para> commands ahead of the test for non-interactive use.</para>
</note> </note>