changingowner: Add --from lfs for chown root:root commands

So if the user has not set $LFS properly, chown will do nothing instead
of wreak havoc in the host distro.

--from <user> has been available for Coreutils chown since 2000 so we
don't need to raise the host system requirement.
This commit is contained in:
Xi Ruoyao 2024-04-27 12:22:28 +08:00
parent 7db37658c2
commit 6e179a9025
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3

View File

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