Просмотр исходного кода

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 <[email protected]>

SVN-Revision: 9412
Felix Fietkau 18 лет назад
Родитель
Сommit
a10edd4cee
2 измененных файлов с 15 добавлено и 0 удалено
  1. 1 0
      package/udev/Makefile
  2. 14 0
      target/linux/generic-2.6/base-files/init

+ 1 - 0
package/udev/Makefile

@@ -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/

+ 14 - 0
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