mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-18 19:29:21 +01: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>
|
</variablelist>
|
||||||
-->
|
-->
|
||||||
<para>In some host systems, <filename>/dev/shm</filename> is a
|
<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
|
The /run tmpfs was mounted above so in this case only a
|
||||||
directory needs to be created.</para>
|
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>
|
we must explicitly mount a tmpfs:</para>
|
||||||
|
|
||||||
<screen><userinput>if [ -h $LFS/dev/shm ]; then
|
<screen><userinput>if [ -h $LFS/dev/shm ]; then
|
||||||
(cd $LFS/dev; mkdir $(readlink shm))
|
mkdir -pv $LFS$(realpath /dev/shm)
|
||||||
else
|
else
|
||||||
mount -vt tmpfs -o nosuid,nodev tmpfs $LFS/dev/shm
|
mount -vt tmpfs -o nosuid,nodev tmpfs $LFS/dev/shm
|
||||||
fi</userinput></screen>
|
fi</userinput></screen>
|
||||||
|
@ -130,7 +130,7 @@ mounttype proc proc proc
|
|||||||
mounttype sys sysfs sysfs
|
mounttype sys sysfs sysfs
|
||||||
mounttype run tmpfs run
|
mounttype run tmpfs run
|
||||||
if [ -h $LFS/dev/shm ]; then
|
if [ -h $LFS/dev/shm ]; then
|
||||||
mkdir -pv $LFS/$(readlink $LFS/dev/shm)
|
mkdir -pv $LFS$(realpath /dev/shm)
|
||||||
else
|
else
|
||||||
mounttype dev/shm tmpfs tmpfs -o nosuid,nodev
|
mounttype dev/shm tmpfs tmpfs -o nosuid,nodev
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user