1
0
Fork 0
mirror of https://github.com/pygos/init-scripts.git synced 2024-11-14 00:47:10 +01:00
init-scripts/services/devfs.in
David Oberhollenzer 628adf2e03 Move contents of devfs.sh script into service file
Conditionals can be eliminated, since we know exactely what the
situation looks like on Linux.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-09-18 13:07:09 +02:00

22 lines
585 B
Text

description "mount /dev"
type wait
target boot
after procfs sysfs
before vfs
exec {
mount -t devtmpfs none /dev
ln -snf /proc/self/fd /dev/fd
ln -snf /proc/self/fd/0 /dev/stdin
ln -snf /proc/self/fd/1 /dev/stdout
ln -snf /proc/self/fd/2 /dev/stderr
ln -snf /proc/kcore /dev/core
mkdir -p /dev/mqueue -m 1777
mkdir -p /dev/pts -m 0755
mkdir -p /dev/shm -m 1777
"@SCRIPTDIR@/trymount.sh" /dev/mqueue mqueue noexec,nosuid,nodev
"@SCRIPTDIR@/trymount.sh" /dev/pts devpts noexec,nosuid,gid=5,mode=0620
"@SCRIPTDIR@/trymount.sh" /dev/shm tmpfs noexec,nosuid,nodev,mode=1777
}