Skip to content

Commit d476441

Browse files
committed
Only mount kernel virtual filesystems when kernel doesn't.
1 parent badb964 commit d476441

File tree

3 files changed

+16
-4
lines changed
  • s6/sv
    • mnt-devpts
    • mnt-shm
    • prep-dev

3 files changed

+16
-4
lines changed

s6/sv/mnt-devpts/up

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
#!/bin/execlineb -P
22
if { s6-echo "[ Virtual-FS ] 3/6 : Mounting /dev/pts" }
3-
s6-mount -t devpts -o mode=0620,gid=5,nosuid,noexec devpts /dev/pts
3+
foreground {
4+
if -n { mountpoint -q /dev/pts }
5+
s6-mount -t devpts -o mode=0620,gid=5,nosuid,noexec devpts /dev/pts
6+
}

s6/sv/mnt-shm/up

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
#!/bin/execlineb -P
22
if { s6-echo "[ Virtual-FS ] 4/6 : Mounting /dev/shm" }
3-
s6-mount -t tmpfs -o mode=1777,nosuid,nodev shm /dev/shm
3+
foreground {
4+
if -n { mountpoint -q /dev/shm }
5+
s6-mount -t tmpfs -o mode=1777,nosuid,nodev shm /dev/shm
6+
}

s6/sv/prep-dev/up

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
#!/bin/execlineb -P
22
if { s6-echo "[ Virtual-FS ] 0/6 : Creating mount points" }
3-
s6-mkdir /dev/shm
4-
s6-mkdir /dev/pts
3+
foreground {
4+
if -n { s6-test -d /dev/shm }
5+
s6-mkdir /dev/shm
6+
}
7+
foreground {
8+
if -n { s6-test -d /dev/pts }
9+
s6-mkdir /dev/pts
10+
}

0 commit comments

Comments
 (0)