diff options
author | Thomas Bächler <thomas@archlinux.org> | 2010-06-03 13:07:45 +0200 |
---|---|---|
committer | Thomas Bächler <thomas@archlinux.org> | 2010-06-03 13:07:45 +0200 |
commit | caa76df5f066e65f0dc39feba46013d205fc472b (patch) | |
tree | 34f75c0d35c638cd9931dd5cf4ead699b951c42b | |
parent | 6931135f3b243ea76cae70bec4070ce2c6ddd6fd (diff) | |
download | initscripts-caa76df5f066e65f0dc39feba46013d205fc472b.tar.xz |
Only mount /proc, /sys and /dev if they haven't been mounted already, use devtmpfs instead of tmpfs if supported by the kernel
-rwxr-xr-x | rc.sysinit | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -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/ |