mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-18 13:07:50 +00:00
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.
This commit is contained in:
parent
677f795cf8
commit
8cf42d4c72
@ -97,7 +97,8 @@ mount -vt tmpfs tmpfs $LFS/run</userinput></screen>
|
||||
</variablelist>
|
||||
-->
|
||||
<para>In some host systems, <filename>/dev/shm</filename> is a
|
||||
symbolic link to <filename class="directory">/run/shm</filename>.
|
||||
symbolic link to a directory, typically
|
||||
<filename class="directory">/run/shm</filename>.
|
||||
The /run tmpfs was mounted above so in this case only a
|
||||
directory needs to be created.</para>
|
||||
|
||||
@ -107,7 +108,7 @@ mount -vt tmpfs tmpfs $LFS/run</userinput></screen>
|
||||
we must explicitly mount a tmpfs:</para>
|
||||
|
||||
<screen><userinput>if [ -h $LFS/dev/shm ]; then
|
||||
(cd $LFS/dev; mkdir $(readlink shm))
|
||||
mkdir -pv $LFS$(realpath /dev/shm)
|
||||
else
|
||||
mount -vt tmpfs -o nosuid,nodev tmpfs $LFS/dev/shm
|
||||
fi</userinput></screen>
|
||||
|
@ -130,7 +130,7 @@ mounttype proc proc proc
|
||||
mounttype sys sysfs sysfs
|
||||
mounttype run tmpfs run
|
||||
if [ -h $LFS/dev/shm ]; then
|
||||
mkdir -pv $LFS/$(readlink $LFS/dev/shm)
|
||||
mkdir -pv $LFS$(realpath /dev/shm)
|
||||
else
|
||||
mounttype dev/shm tmpfs tmpfs -o nosuid,nodev
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user