From: jow Date: Sun, 8 May 2011 10:48:38 +0000 (+0000) Subject: [backfire] backport r26808 and r26848 X-Git-Url: http://git.ozo.com/?p=openwrt-10.03%2F.git;a=commitdiff_plain;h=a48b1c1ca7ace2491c2c892b47a5eb5b10846e8f [backfire] backport r26808 and r26848 git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@26851 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/package/base-files/Makefile b/package/base-files/Makefile index af14cb44b..7557d3c29 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -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 diff --git a/package/base-files/files/etc/hotplug2-common.rules b/package/base-files/files/etc/hotplug2-common.rules index 53f3e34f0..7f7c081a4 100644 --- a/package/base-files/files/etc/hotplug2-common.rules +++ b/package/base-files/files/etc/hotplug2-common.rules @@ -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 diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot index 7927af154..123ceb778 100755 --- a/package/base-files/files/etc/init.d/boot +++ b/package/base-files/files/etc/init.d/boot @@ -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() {