mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-18 04:57:38 +00:00
If we need to create the link target of /dev/shm, make its mode 1777
To match the behavior of a tmpfs mount. Otherwise non-root user (for e.g. the tester user) will get errors using Glibc shm functions.
This commit is contained in:
parent
8cf42d4c72
commit
7436c28ae4
@ -100,7 +100,7 @@ mount -vt tmpfs tmpfs $LFS/run</userinput></screen>
|
||||
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>
|
||||
directory needs to be created with a correct mode.</para>
|
||||
|
||||
<para>In other host systems <filename>/dev/shm</filename> is a mount point
|
||||
for a tmpfs. In that case the mount of /dev above will only create
|
||||
@ -108,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
|
||||
mkdir -pv $LFS$(realpath /dev/shm)
|
||||
install -v -d -m 1777 $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$(realpath /dev/shm)
|
||||
install -v -d -m 1777 $LFS$(realpath /dev/shm)
|
||||
else
|
||||
mounttype dev/shm tmpfs tmpfs -o nosuid,nodev
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user