|
@@ -21,8 +21,8 @@
|
|
|
following command:</para-->
|
|
|
<para>在本书中,我们经常使用环境变量 <envar>LFS</envar> 。您应该保证,
|
|
|
在构建 LFS 的全过程中,该变量都被定义且设置为您构建 LFS 使用的目录
|
|
|
- - 我们使用 <filename class="directory">/mnt/lfs</filename> 作为例子,
|
|
|
- 然而您可以选择其他目录。如果您在一个独立的分区上构建 LFS ,
|
|
|
+ —— 我们使用 <filename class="directory">/mnt/lfs</filename> 作为例子,
|
|
|
+ 但您可以选择其他目录。如果您在一个独立的分区上构建 LFS ,
|
|
|
那么这个目录将成为该分区的挂载点。选择一个目录,
|
|
|
然后用下列命令设置环境变量:</para>
|
|
|
|
|
@@ -35,7 +35,7 @@
|
|
|
processes the command line.</para-->
|
|
|
<para>设置该环境变量的好处是,我们可以直接输入书中的命令,例如
|
|
|
<command>mkdir -v $LFS/tools</command> 。
|
|
|
- Shell 在解析命令时会自动把 <quote>$LFS</quote> 替换成
|
|
|
+ Shell 在解析命令时会自动将 <quote>$LFS</quote> 替换成
|
|
|
<quote>/mnt/lfs</quote>(或是您设置的其他值)。</para>
|
|
|
|
|
|
<caution>
|
|
@@ -44,7 +44,7 @@
|
|
|
<command>su</command> to <systemitem class="username">root</systemitem> or
|
|
|
another user). Check that the <envar>LFS</envar> variable is set up
|
|
|
properly with:</para-->
|
|
|
- <para> 如果您离开又重新进入了工作环境 (例如使用 <command>su</command>
|
|
|
+ <para> 如果您离开并重新进入了工作环境 (例如使用 <command>su</command>
|
|
|
切换到 <systemitem class="username">root</systemitem> 或者其他用户),
|
|
|
请执行下列命令,检查 <envar>LFS</envar> 的设置是否正确:</para>
|
|
|
|
|
@@ -55,7 +55,7 @@
|
|
|
provided example was followed. If the output is incorrect, use the command
|
|
|
given earlier on this page to set <envar>$LFS</envar> to the correct
|
|
|
directory name.</para-->
|
|
|
- <para> 确认该命令的输出是您构建 LFS 的位置,如果您使用本书提供的例子,
|
|
|
+ <para>确认该命令的输出是您构建 LFS 的位置,如果您使用本书提供的例子,
|
|
|
那么输出应该是 <filename class="directory">/mnt/lfs</filename>。
|
|
|
如果输出不正确,使用前文给出的命令,将 <envar>$LFS</envar>
|
|
|
设置成正确的目录名。</para>
|
|
@@ -69,14 +69,14 @@
|
|
|
<envar>LFS</envar> variable needs to be bash to ensure that the
|
|
|
<filename>/root/.bash_profile</filename> file is incorporated as a part of
|
|
|
the login process.</para-->
|
|
|
- <para>确保 <envar>LFS</envar> 始终正确的一种方法是编辑您的主目录中的
|
|
|
+ <para>确保 <envar>LFS</envar> 始终正确的一种方法是:编辑您的主目录中的
|
|
|
<filename>.bash_profile</filename> 以及
|
|
|
<systemitem class="username">root</systemitem> 用户的
|
|
|
<filename>/root/.bash_profile</filename>,为它们加入上述设置并导出
|
|
|
- <envar>LFS</envar> 变量的 <command>export</command> 命令。另外,确认
|
|
|
- <filename>/etc/passwd</filename> 中给出的每个登录用户使用的 shell
|
|
|
- 都是 bash,以保证每次登录时都执行 <filename>.bash_profile</filename>
|
|
|
- 中的命令。</para>
|
|
|
+ <envar>LFS</envar> 变量的 <command>export</command> 命令。还要确认
|
|
|
+ <filename>/etc/passwd</filename> 中为每个需要使用 <envar>LFS</envar>
|
|
|
+ 变量的用户指定的 shell 都是 bash,以保证每次登录时都执行
|
|
|
+ <filename>.bash_profile</filename> 中的命令。</para>
|
|
|
|
|
|
<!--para>Another consideration is the method that is used to log into the
|
|
|
host system. If logging in through a graphical display manager, the
|
|
@@ -91,10 +91,9 @@
|
|
|
一般不会被虚拟终端执行。此时,应该将 <command>export</command>
|
|
|
命令加入到您使用的用户和
|
|
|
<systemitem class="username">root</systemitem> 的
|
|
|
- <filename>.bashrc</filename> 中去。另外,如果以非交互模式启动 bash,
|
|
|
+ <filename>.bashrc</filename> 文件中。另外,如果以非交互模式启动 bash,
|
|
|
有的发行版不会执行 <filename>.bashrc</filename> 中的指令。
|
|
|
此时一定要在使用环境变量前添加 <command>export</command> 命令。</para>
|
|
|
-
|
|
|
</note>
|
|
|
|
|
|
</sect1>
|