From caa76df5f066e65f0dc39feba46013d205fc472b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20B=C3=A4chler?= Date: Thu, 3 Jun 2010 13:07:45 +0200 Subject: Only mount /proc, /sys and /dev if they haven't been mounted already, use devtmpfs instead of tmpfs if supported by the kernel --- rc.sysinit | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/rc.sysinit b/rc.sysinit index c558745..d029458 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -17,9 +17,19 @@ printsep run_hook sysinit_start # mount /proc, /sys and our RAM /dev -/bin/mount -n -t tmpfs udev /dev -o mode=0755,size=10M,nosuid -/bin/mount -n -t proc none /proc -/bin/mount -n -t sysfs none /sys +if ! /bin/mountpoint -q /proc; then + /bin/mount -n -t proc none /proc +fi +if ! /bin/mountpoint -q /sys; then + /bin/mount -n -t sysfs none /sys +fi +if ! /bin/mountpoint -q /dev; then + if grep -q devtmpfs /proc/filesystems 2>/dev/null; then + /bin/mount -n -t devtmpfs udev /dev -o mode=0755,size=10M,nosuid + else + /bin/mount -n -t tmpfs udev /dev -o mode=0755,size=10M,nosuid + fi +fi # Copy static device nodes to /dev /bin/cp -a /lib/udev/devices/* /dev/ -- cgit v1.2.3