From fe6ca9f9f97060f11628ab93963ed197d856e418 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Wed, 30 Nov 2011 20:02:30 +0100 Subject: [PATCH] mountproc: mount /dev,/run,/dev/pts,/dev/shm if not already mounted --- etc/rc.d/init.d/mountproc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/etc/rc.d/init.d/mountproc b/etc/rc.d/init.d/mountproc index 9b494a4..60a8bb9 100755 --- a/etc/rc.d/init.d/mountproc +++ b/etc/rc.d/init.d/mountproc @@ -29,3 +29,19 @@ if [ ! -e /sys/kernel ]; then evaluate_retval echo fi +if [ ! "`grep ' /dev ' /proc/mounts`" ]; then + [ "`grep devtmpfs /proc/filesystems`" ] && \ + mount -n -t devtmpfs udev /dev || \ + mount -n -t tmpfs udev /dev +fi +if [ ! "`grep ' /run ' /proc/mounts`" ]; then + mount -n -t tmpfs tmpfs /run +fi +if [ ! "`grep ' /dev/pts ' /proc/mounts`" ]; then + mkdir -p /dev/pts + mount -n -t devpts devpts /dev/pts -o gid=4,mode=620 +fi +if [ ! "`grep ' /dev/shm ' /proc/mounts`" ]; then + mkdir -p /dev/shm + mount -n -t tmpfs devshm /dev/shm +fi