Add udev initilisation
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 23 Oct 2007 06:23:36 +0000 (06:23 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 23 Oct 2007 06:23:36 +0000 (06:23 +0000)
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

package/udev/Makefile
target/linux/generic-2.6/base-files/init

index 0ab8ec83d024659b94ce77f07ccdcb7022c4c753..bde7a61e3d1ad685d32901cd08588cf2c65dd3bb 100644 (file)
@@ -54,6 +54,7 @@ define Package/udev/install
        install -d -m0775 $(1)/sbin/
        $(CP) $(PKG_INSTALL_DIR)/sbin/udevcontrol $(1)/sbin/
        $(CP) $(PKG_INSTALL_DIR)/sbin/udevd $(1)/sbin/
+       $(CP) $(PKG_INSTALL_DIR)/sbin/udevsettle $(1)/sbin/
        install -d -m0775 $(1)/usr/bin/
        $(CP) $(PKG_INSTALL_DIR)/usr/bin/udevinfo $(1)/usr/bin/
        $(CP) $(PKG_INSTALL_DIR)/usr/bin/udevtest $(1)/usr/bin/
index 98002aba3db7e4b368fc3cf78b5d1e36c568bd78..73bef61b2e6eaa9c1afa17e091b99458374ffe03 100755 (executable)
@@ -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