Changeset ec7b0466
- Timestamp:
- 09/27/2022 06:07:58 PM (18 months ago)
- Branches:
- 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, bdubbs/gcc13, multilib, renodr/libudev-from-systemd, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- ef93b66
- Parents:
- 2646c57
- Location:
- chapter04
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter04/addinguser.xml
r2646c57 rec7b0466 15 15 the packages in the next two chapters are built as an unprivileged user. 16 16 You could use your own user name, but to make it easier to set up a clean 17 working environment, create a new user called <systemitem17 working environment, we will create a new user called <systemitem 18 18 class="username">lfs</systemitem> as a member of a new group (also named 19 <systemitem class="groupname">lfs</systemitem>) and usethis user during19 <systemitem class="groupname">lfs</systemitem>) and log in as this user during 20 20 the installation process. As <systemitem class="username">root</systemitem>, 21 21 issue the following commands to add the new user:</para> … … 25 25 26 26 <variablelist> 27 <title>Th e meaning of the command line options:</title>27 <title>This is what the command line options mean:</title> 28 28 29 29 <varlistentry> … … 55 55 <listitem> 56 56 <para>This parameter prevents possible copying of files from a skeleton 57 directory ( default is <filename class="directory">/etc/skel</filename>)57 directory (the default is <filename class="directory">/etc/skel</filename>) 58 58 by changing the input location to the special null device.</para> 59 59 </listitem> … … 69 69 </variablelist> 70 70 71 <para>To log in as <systemitem class="username">lfs</systemitem> (as opposed71 <para>To enable logging in as <systemitem class="username">lfs</systemitem> (as opposed 72 72 to switching to user <systemitem class="username">lfs</systemitem> when logged 73 73 in as <systemitem class="username">root</systemitem>, which does not require … … 78 78 79 79 <para>Grant <systemitem class="username">lfs</systemitem> full access to 80 all directories under <filename class="directory">$LFS</filename> by making81 <systemitem class="username">lfs</systemitem> the directoryowner:</para>80 all the directories under <filename class="directory">$LFS</filename> by making 81 <systemitem class="username">lfs</systemitem> the owner:</para> 82 82 83 83 <screen><userinput>chown -v lfs $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools} … … 86 86 esac</userinput></screen> 87 87 88 <note><para>In some host systems, the followingcommand does not complete89 properly and suspends the login tothe &lfs-user; user to the background.88 <note><para>In some host systems, the following <command>su</command> command does not complete 89 properly and suspends the login for the &lfs-user; user to the background. 90 90 If the prompt "lfs:~$" does not appear immediately, entering the 91 91 <command>fg</command> command will fix the issue.</para></note> … … 99 99 <para>The <quote><parameter>-</parameter></quote> instructs 100 100 <command>su</command> to start a login shell as opposed to a non-login shell. 101 The difference between these two types of shells can be found in detail in101 The difference between these two types of shells is described in detail in 102 102 <filename>bash(1)</filename> and <command>info bash</command>.</para> 103 103 -
chapter04/settingenviron.xml
r2646c57 rec7b0466 33 33 34 34 <para>The new instance of the shell is a <emphasis>non-login</emphasis> 35 shell, which does not read, and execute, the contents of <filename>/etc/profile</filename> or35 shell, which does not read, and execute, the contents of the <filename>/etc/profile</filename> or 36 36 <filename>.bash_profile</filename> files, but rather reads, and executes, the 37 37 <filename>.bashrc</filename> file instead. Create the … … 60 60 <command>bash</command>'s hash function. Hashing is ordinarily a useful 61 61 feature—<command>bash</command> uses a hash table to remember the 62 full path ofexecutable files to avoid searching the <envar>PATH</envar>62 full path to executable files to avoid searching the <envar>PATH</envar> 63 63 time and again to find the same executable. However, the new tools should 64 be used as soon as they are installed. By switching off the hash function,65 the shell will always search the <envar>PATH</envar> whena program is to64 be used as soon as they are installed. Switching off the hash function forces 65 the shell to search the <envar>PATH</envar> whenever a program is to 66 66 be run. As such, the shell will find the newly compiled tools in 67 67 <filename class="directory">$LFS/tools/bin</filename> as soon as they are … … 116 116 <term><parameter>PATH=/usr/bin</parameter></term> 117 117 <listitem> 118 <para>Many modern linux distributions have merged <filename118 <para>Many modern Linux distributions have merged <filename 119 119 class="directory">/bin</filename> and <filename 120 120 class="directory">/usr/bin</filename>. When this is the case, the standard 121 <envar>PATH</envar> variable needs just tobe set to <filename121 <envar>PATH</envar> variable should be set to <filename 122 122 class="directory">/usr/bin/</filename> for the <xref 123 123 linkend="chapter-temporary-tools"/> environment. When this is not the … … 142 142 of <xref linkend="chapter-cross-tools"/> is picked up by the shell 143 143 immediately after its installation. This, combined with turning off hashing, 144 limits the risk that the compiler from the host beused instead of the144 limits the risk that the compiler from the host is used instead of the 145 145 cross-compiler.</para> 146 146 </listitem> … … 196 196 197 197 <para>Finally, to have the environment fully prepared for building the 198 temporary tools, source the just-created user profile:</para> 198 temporary tools, force the <command>bash</command> shell to read 199 the new user profile:</para> 199 200 200 201 <screen><userinput>source ~/.bash_profile</userinput></screen>
Note:
See TracChangeset
for help on using the changeset viewer.