aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic-2.6/base-files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-10-23 06:23:36 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-10-23 06:23:36 +0000
commit3aade25a90245511c0b5f0ad7278a1977e248a4c (patch)
treefb18971863f8497029305b351a435c84d2c01825 /target/linux/generic-2.6/base-files
parent00b56dd8e23d654939ea37af86f7c0e7e201a2e1 (diff)
downloadupstream-3aade25a90245511c0b5f0ad7278a1977e248a4c.tar.gz
upstream-3aade25a90245511c0b5f0ad7278a1977e248a4c.tar.bz2
upstream-3aade25a90245511c0b5f0ad7278a1977e248a4c.zip
Add udev initilisation
We have a udev package, but no means to start udev at boot. This change adds the necessary startup in /init, and adds the required /sbin/udevsettle to the udev installed files Signed-off-by: Jeremy Kerr <jk@ozlabs.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9412 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic-2.6/base-files')
-rwxr-xr-xtarget/linux/generic-2.6/base-files/init14
1 files changed, 14 insertions, 0 deletions
diff --git a/target/linux/generic-2.6/base-files/init b/target/linux/generic-2.6/base-files/init
index 98002aba3d..73bef61b2e 100755
--- a/target/linux/generic-2.6/base-files/init
+++ b/target/linux/generic-2.6/base-files/init
@@ -14,6 +14,20 @@ elif [ -x /sbin/hotplug2 ]; then
mkdir /dev/pts
mkdir /dev/shm
/sbin/hotplug2 --no-persistent --coldplug --max_children 1
+
+elif [ -x /sbin/udevd ]; then
+ mount -n -t tmpfs -o mode=0755 udev /dev
+ mkdir /dev/pts
+ mkdir /dev/shm
+
+ if [ -e /proc/sys/kernel/hotplug ]; then
+ echo "" > /proc/sys/kernel/hotplug
+ fi
+
+ /sbin/udevd --daemon
+ /sbin/udevtrigger
+ /sbin/udevsettle
+
fi
mount none /dev/pts -t devpts