Changeset 8cf42d4


Ignore:
Timestamp:
02/03/2024 07:42:36 PM (4 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
12.1, 12.1-rc1, multilib, trunk, xry111/arm64, xry111/clfs-ng, xry111/loongarch, xry111/loongarch-12.1, xry111/mips64el
Children:
7436c28, 807b061
Parents:
677f795
git-author:
Xi Ruoyao <xry111@…> (02/03/2024 07:40:36 PM)
git-committer:
Xi Ruoyao <xry111@…> (02/03/2024 07:42:36 PM)
Message:

Fix and unify the commands creating the link target of /dev/shm

$(realpath /dev/shm) will return the absolute path of the target of
/dev/shm, thus the command will work for both absolute symlink and
relative symlink.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • chapter07/kernfs.xml

    r677f795 r8cf42d4  
    9898-->
    9999      <para>In some host systems, <filename>/dev/shm</filename> is a
    100       symbolic link to <filename class="directory">/run/shm</filename>.
     100      symbolic link to a directory, typically
     101      <filename class="directory">/run/shm</filename>.
    101102      The /run tmpfs was mounted above so in this case only a
    102103      directory needs to be created.</para>
     
    108109
    109110<screen><userinput>if [ -h $LFS/dev/shm ]; then
    110   (cd $LFS/dev; mkdir $(readlink shm))
     111  mkdir -pv $LFS$(realpath /dev/shm)
    111112else
    112113  mount -vt tmpfs -o nosuid,nodev tmpfs $LFS/dev/shm
  • chapter11/afterlfs.xml

    r677f795 r8cf42d4  
    131131mounttype run     tmpfs  run
    132132if [ -h $LFS/dev/shm ]; then
    133   mkdir -pv $LFS/$(readlink $LFS/dev/shm)
     133  mkdir -pv $LFS$(realpath /dev/shm)
    134134else
    135135  mounttype dev/shm tmpfs tmpfs -o nosuid,nodev
Note: See TracChangeset for help on using the changeset viewer.