package/base-files: add support for devtmpfs (thank you rauchwolke at gmx.net)

SVN-Revision: 22379
owl
Alexandros C. Couloumbis 2010-07-24 19:21:27 +00:00
parent e1a654dd9f
commit 6a85a3b53b
1 changed files with 13 additions and 1 deletions

View File

@ -2,6 +2,16 @@
# Copyright (C) 2006 OpenWrt.org # Copyright (C) 2006 OpenWrt.org
# Copyright (C) 2010 Vertical Communications # 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() { do_mount_devfs() {
mount devfs /dev -t devfs mount devfs /dev -t devfs
} }
@ -15,7 +25,9 @@ do_mount_udev() {
} }
choose_device_fs() { 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 do_mount_devfs
elif [ -x /sbin/hotplug2 ]; then elif [ -x /sbin/hotplug2 ]; then
do_mount_hotplug do_mount_hotplug