src/world/s6-scripts/etc/s6/sv/mount-devfs/up

17 lines
559 B
Plaintext

#!/bin/execlineb -P
foreground { ln -snf /proc/self/fd /dev/fd }
foreground { ln -snf /proc/self/fd/0 /dev/stdin }
foreground { ln -snf /proc/self/fd/1 /dev/stdout }
foreground { ln -snf /proc/self/fd/2 /dev/stderr }
foreground { ln -snf /proc/kcore /dev/core }
foreground { mkdir -p /dev/pts }
foreground { mkdir -p /dev/shm }
foreground {
if -n { mountpoint -q /dev/pts }
mount -t devpts devpts /dev/pts -o mode=0620,gid=5,nosuid,noexec
}
foreground {
if -n { mountpoint -q /dev/shm }
mount -t tmpfs shm /dev/shm -o mode=1777,nosuid,nodev
}