Changeset 01247ac


Ignore:
Timestamp:
11/19/2023 11:23:36 PM (6 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, xry111/update-glibc
Children:
49b383e, 6554500, 7546d8b
Parents:
f16cc36
git-author:
Xi Ruoyao <xry111@…> (11/19/2023 11:18:26 PM)
git-committer:
Xi Ruoyao <xry111@…> (11/19/2023 11:23:36 PM)
Message:

kernfs: Revise command creating the link target in case /dev/shm is a symlink

When /dev/shm is a symlink we need to create its target or some tests
will fail and Python 3 will be misconfigured. We wrote it as:

mkdir -pv $LFS/$(readlink $LFS/dev/shm)

But if $LFS/dev/shm is a relative symlink (say ../run/shm), we end up:

mkdir -pv /mnt/lfs/../run/shm

This command will create /mnt/run/shm, not $LFS/mnt/shm as we expected.
Twist it a little to make it work for both absolute symlinks and
relative symlinks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter07/kernfs.xml

    rf16cc36 r01247ac  
    108108
    109109<screen><userinput>if [ -h $LFS/dev/shm ]; then
    110   mkdir -pv $LFS/$(readlink $LFS/dev/shm)
     110  (cd $LFS/dev; mkdir $(readlink shm))
    111111else
    112112  mount -vt tmpfs -o nosuid,nodev tmpfs $LFS/dev/shm
Note: See TracChangeset for help on using the changeset viewer.