Use lfs-user entity in commands

I still think it's cleaner for jhalfs to just use a different user name
(for example "lfs1") if the user lfs already exists.  This will allow
jhalfs to easily use a different user name.
This commit is contained in:
Xi Ruoyao 2024-12-26 18:39:39 +08:00 committed by Pierre Labastie
parent f1a5ce3860
commit 8e8be5f129
2 changed files with 8 additions and 8 deletions

View File

@ -20,8 +20,8 @@
the installation process. As <systemitem class="username">root</systemitem>,
issue the following commands to add the new user:</para>
<screen><userinput>groupadd lfs
useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput></screen>
<screen><userinput>groupadd &lfs-user;
useradd -s /bin/bash -g &lfs-user; -m -k /dev/null &lfs-user;</userinput></screen>
<variablelist>
<title>This is what the command line options mean:</title>
@ -74,15 +74,15 @@ useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput></screen>
have a password), you need to set a password for &lfs-user;. Issue the
following command as the &root; user to set the password:</para>
<screen role="nodump"><userinput>passwd lfs</userinput></screen>
<screen role="nodump"><userinput>passwd &lfs-user;</userinput></screen>
<para>Grant <systemitem class="username">lfs</systemitem> full access to
all the directories under <filename class="directory">$LFS</filename> by making
<systemitem class="username">lfs</systemitem> the owner:</para>
<screen><userinput>chown -v lfs $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools}
<screen><userinput>chown -v &lfs-user; $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools}
case $(uname -m) in
x86_64) chown -v lfs $LFS/lib64 ;;
x86_64) chown -v &lfs-user; $LFS/lib64 ;;
esac</userinput></screen>
<note><para>In some host systems, the following <command>su</command> command does not complete
@ -94,7 +94,7 @@ esac</userinput></screen>
logging in as &lfs-user; on a virtual console, or with the following
substitute/switch user command:</para>
<screen role="nodump"><userinput>su - lfs</userinput></screen>
<screen role="nodump"><userinput>su - &lfs-user;</userinput></screen>
<para>The <quote><parameter>-</parameter></quote> instructs
<command>su</command> to start a login shell as opposed to a non-login shell.

View File

@ -33,9 +33,9 @@
user <systemitem class="username">root</systemitem> by running the following
command:</para>
<screen><userinput>chown --from lfs -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools}
<screen><userinput>chown --from &lfs-user; -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools}
case $(uname -m) in
x86_64) chown --from lfs -R root:root $LFS/lib64 ;;
x86_64) chown --from &lfs-user; -R root:root $LFS/lib64 ;;
esac</userinput></screen>
</sect1>