diff options
author | Alexandros C. Couloumbis <alex@ozo.com> | 2010-07-24 19:21:27 +0000 |
---|---|---|
committer | Alexandros C. Couloumbis <alex@ozo.com> | 2010-07-24 19:21:27 +0000 |
commit | 6a85a3b53b41fe8e565ba353bb3b1c76701c8e05 (patch) | |
tree | 2f38fb394c4ec21e0734f09b72d23556db232f58 /package/base-files/files/lib/preinit | |
parent | e1a654dd9f264d9747c7ea43e7bd35dd5955143a (diff) | |
download | upstream-6a85a3b53b41fe8e565ba353bb3b1c76701c8e05.tar.gz upstream-6a85a3b53b41fe8e565ba353bb3b1c76701c8e05.tar.bz2 upstream-6a85a3b53b41fe8e565ba353bb3b1c76701c8e05.zip |
package/base-files: add support for devtmpfs (thank you rauchwolke at gmx.net)
SVN-Revision: 22379
Diffstat (limited to 'package/base-files/files/lib/preinit')
-rw-r--r-- | package/base-files/files/lib/preinit/20_device_fs_mount | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/package/base-files/files/lib/preinit/20_device_fs_mount b/package/base-files/files/lib/preinit/20_device_fs_mount index f82f9a6f45..6ba7ccc6f1 100644 --- a/package/base-files/files/lib/preinit/20_device_fs_mount +++ b/package/base-files/files/lib/preinit/20_device_fs_mount @@ -2,6 +2,16 @@ # Copyright (C) 2006 OpenWrt.org # Copyright (C) 2010 Vertical Communications +do_move_devtmpfs() { + foo="`grep devtmpfs /proc/mounts`" + x=${foo#* } + x=${x%% *} + + if [ "$x" != "/dev" ] ; then + mount -o move "$x" /dev + fi +} + do_mount_devfs() { mount devfs /dev -t devfs } @@ -15,7 +25,9 @@ do_mount_udev() { } choose_device_fs() { - if grep -q devfs /proc/filesystems; then + if grep -q devtmpfs /proc/mounts; then + do_move_devtmpfs + elif grep -q devfs /proc/filesystems; then do_mount_devfs elif [ -x /sbin/hotplug2 ]; then do_mount_hotplug |