Hi
in 2.6.32 devtmpfs a early devfs created by the kernel is available and added
to the kernel config by default
grep "DEVTMPFS" config-2.6.32
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_DEVTMPFS=y
this means: devtmpfs is mounted on root by the kernel. but its not used ...
this patches moves devtmpfs if available to root instead of using devfs...
greets
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 6b2a6e8..86ef93f 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 devfs /proc/filesystems > /dev/null; then
+ if grep devtmpfs /proc/mounts > /dev/null; then
+ do_move_devtmpfs
+ elif grep devfs /proc/filesystems > /dev/null; then
do_mount_devfs
elif [ -x /sbin/hotplug2 ]; then
do_mount_hotplug
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel