mountproc: mount /dev,/run,/dev/pts,/dev/shm if not already mounted

This commit is contained in:
Silvan Calarco 2011-11-30 20:02:30 +01:00
parent 79c2f0913b
commit fe6ca9f9f9

View File

@ -29,3 +29,19 @@ if [ ! -e /sys/kernel ]; then
evaluate_retval evaluate_retval
echo echo
fi 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