mirror of
https://github.com/pygos/init.git
synced 2024-11-22 19:19:47 +01:00
22 lines
951 B
Bash
22 lines
951 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
@SBINPATH@/mount -t devtmpfs none /dev
|
||
|
|
||
|
[ -c /dev/console ] || @SBINPATH@/mknod -m 600 /dev/console c 5 1
|
||
|
[ -c /dev/tty ] || @SBINPATH@/mknod -m 666 /dev/tty c 5 0
|
||
|
[ -c /dev/null ] || @SBINPATH@/mknod -m 666 /dev/null c 1 3
|
||
|
[ -c /dev/kmsg ] || @SBINPATH@/mknod -m 660 /dev/kmsg c 1 11
|
||
|
[ -e /dev/fd ] || @BINPATH@/ln -snf /proc/self/fd /dev/fd
|
||
|
[ -e /dev/stdin ] || @BINPATH@/ln -snf /proc/self/fd/0 /dev/stdin
|
||
|
[ -e /dev/stdout ] || @BINPATH@/ln -snf /proc/self/fd/1 /dev/stdout
|
||
|
[ -e /dev/stderr ] || @BINPATH@/ln -snf /proc/self/fd/2 /dev/stderr
|
||
|
[ -e /proc/kcore ] && @BINPATH@/ln -snf /proc/kcore /dev/core
|
||
|
|
||
|
@BINPATH@/mkdir -p /dev/mqueue -m 1777
|
||
|
@BINPATH@/mkdir -p /dev/pts -m 0755
|
||
|
@BINPATH@/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"
|