commit d72fe8b935cc6dcd73d22bb65f7ba4ade5ea5ebf
parent a88fa3b7cd5c50ee99b2d87287946a8a08e2827c
Author: Jan Pobříslo <ccx@te2000.cz>
Date: Wed, 20 Oct 2021 00:30:48 +0000
Make /dev/shm symlink into /run/shm so they can be shared across containers
Diffstat:
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/sbin/ns_run b/sbin/ns_run
@@ -91,7 +91,10 @@ if { mknod -m 666 dev/tty c 5 0 }
# also have some convenience dirs in place for optionally bind-mounting them
if {
mkdir
- dev/shm
+
+# dev/shm
+ run/shm
+
dev/pts
dev/mqueue
@@ -107,7 +110,9 @@ if {
}
if { mount -t devpts devpts dev/pts }
-if { s6-mount -nwt tmpfs -o nosuid,nodev,mode=1777 shm dev/shm }
+#if { s6-mount -nwt tmpfs -o nosuid,nodev,mode=1777 shm dev/shm }
+if { s6-ln -sf ../run/shm dev/shm }
+if { chmod 1777 run/shm }
if { s6-mount -nwt mqueue -o nosuid,nodev,noexec mqueue dev/mqueue }
# leave /dev read-write for now, so stuff can be added by scripts below