[backfire] backport r26808 and r26848
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 8 May 2011 10:48:38 +0000 (10:48 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 8 May 2011 10:48:38 +0000 (10:48 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@26851 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/base-files/Makefile
package/base-files/files/etc/hotplug2-common.rules
package/base-files/files/etc/init.d/boot

index af14cb44bb1287f4672508626dd77a9c90c30f64..7557d3c295b24b7090124fea4664fc9421d292aa 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=43.15
+PKG_RELEASE:=43.16
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
 PKG_BUILD_DEPENDS:=opkg/host
index 53f3e34f035498832f29e91293facd36563b34c3..7f7c081a426d064dbd8c4b175ae20c61956c61ee 100644 (file)
@@ -1,5 +1,5 @@
 
-DEVICENAME ~~ (null|full|ptmx|tty|zero|gpio|hvc) {
+DEVICENAME ~~ (null|full|ptmx|zero|gpio|hvc) {
        nothrottle
        makedev /dev/%DEVICENAME% 0666
        next
@@ -10,12 +10,6 @@ DEVICENAME ~~ (tun|tap[0-9]) {
        makedev /dev/net/%DEVICENAME% 0644
 }
 
-DEVICENAME ~~ (ppp) {
-       nothrottle
-       makedev /dev/%DEVICENAME% 0600
-       next
-}
-
 DEVICENAME ~~ (controlC[0-9]|pcmC0D0*|timer) {
        nothrottle
        makedev /dev/snd/%DEVICENAME% 0644
@@ -36,14 +30,26 @@ DEVPATH is set, SUBSYSTEM ~~ (input) {
 DEVICENAME == device-mapper {
        nothrottle
        makedev /dev/mapper/control 0600
+       next
 }
 
-
-DEVPATH is set {
+ACTION == add, DEVPATH is set {
        nothrottle
        makedev /dev/%DEVICENAME% 0644
 }
 
+ACTION == add, DEVPATH is set, DEVICENAME ~~ ^tty {
+       chmod 0666 /dev/%DEVICENAME%
+}
+
+ACTION == add, DEVPATH is set, DEVICENAME ~~ ^ppp {
+       chmod 0600 /dev/%DEVICENAME%
+}
+
+ACTION == remove, DEVPATH is set, MAJOR is set, MINOR is set {
+       remove /dev/%DEVICENAME%
+}
+
 FIRMWARE is set, ACTION == add {
        nothrottle
        load-firmware /lib/firmware
index 7927af15431bd690b287ddbf14d6200e60e91693..123ceb778c3390323c2c0fa911eebc5c58122bfe 100755 (executable)
@@ -80,6 +80,11 @@ start() {
        }
 
        load_modules /etc/modules.d/*
+
+       # another round of USB coldplugging to kick devices into operation which lacked drivers before
+       for dev in /sys/bus/usb/devices/*/uevent; do
+               [ -e "$dev" ] && echo -n add > "$dev"
+       done
 }
 
 stop() {