rust: chapter04: create /opt and chown it to lfs user

This commit is contained in:
Xi Ruoyao 2022-10-09 12:44:52 +08:00
parent f6459cb171
commit dfa490c495
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3
4 changed files with 4 additions and 4 deletions

View File

@ -80,7 +80,7 @@ useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput></screen>
all the directories under <filename class="directory">$LFS</filename> by making all the directories under <filename class="directory">$LFS</filename> by making
<systemitem class="username">lfs</systemitem> the owner:</para> <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 $LFS/{usr{,/*},lib,var,etc,opt,bin,sbin,tools}
case $(uname -m) in case $(uname -m) in
x86_64) chown -v lfs $LFS/lib64 ;; x86_64) chown -v lfs $LFS/lib64 ;;
esac</userinput></screen> esac</userinput></screen>

View File

@ -21,7 +21,7 @@
<para>Create the required directory layout by issuing the following commands as <para>Create the required directory layout by issuing the following commands as
<systemitem class="username">root</systemitem>:</para> <systemitem class="username">root</systemitem>:</para>
<screen><userinput>mkdir -pv $LFS/{etc,var} $LFS/usr/{bin,lib,sbin} <screen><userinput>mkdir -pv $LFS/{etc,opt,var} $LFS/usr/{bin,lib,sbin}
for i in bin lib sbin; do for i in bin lib sbin; do
ln -sv usr/$i $LFS/$i ln -sv usr/$i $LFS/$i

View File

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

View File

@ -19,7 +19,7 @@
<para>Create some root-level directories that are not in the limited set <para>Create some root-level directories that are not in the limited set
required in the previous chapters by issuing the following command:</para> required in the previous chapters by issuing the following command:</para>
<screen><userinput>mkdir -pv /{boot,home,mnt,opt,srv}</userinput></screen> <screen><userinput>mkdir -pv /{boot,home,mnt,srv}</userinput></screen>
<para>Create the required set of subdirectories below the root-level by <para>Create the required set of subdirectories below the root-level by
issuing the following commands:</para> issuing the following commands:</para>