[base-files/generic] update the /init file to start /sbin/init
[openwrt.git] / package / base-files / files / etc / hotplug2-common.rules
index ed785e3..c284f8f 100644 (file)
@@ -1,35 +1,43 @@
 
-DEVICENAME ~~ (null|full|ptmx|tty|zero) {
-       nothrottle
-       makedev /dev/%DEVICENAME% 0666
-       next
+# uncomment me to log hotplug events
+# DEVPATH is set {
+#      exec logger -s -t hotplug -p daemon.info "name=%DEVNAME%, path=%DEVPATH%"
+# }
+
+$include /etc/hotplug2-platform.rules
+
+DEVNAME ~~ (^null$|^full$|^ptmx$|^zero$|^gpio|^hvc) {
+       makedev /dev/%DEVNAME% 0666
+       next-event
+}
+
+DEVNAME == mapper/control {
+       makedev /dev/%DEVNAME% 0600
+       next-event
+}
+
+ACTION == add, DEVPATH is set {
+       makedev /dev/%DEVNAME% 0644
 }
 
-DEVICENAME ~~ (tun|tap[0-9]) {
-       nothrottle
-       makedev /dev/net/%DEVICENAME% 0644
-       next
+ACTION == add, DEVPATH is set, DEVNAME ~~ ^tty {
+       chmod 0666 /dev/%DEVNAME%
 }
 
-DEVICENAME ~~ (ppp) {
-       nothrottle
-       makedev /dev/%DEVICENAME% 0600
-       next
+ACTION == add, DEVPATH is set, DEVNAME ~~ ^ppp {
+       chmod 0600 /dev/%DEVNAME%
 }
 
-DEVICENAME ~~ (controlC[0-9]|pcmC0D0*|timer) {
-       nothrottle
-       makedev /dev/snd/%DEVICENAME% 0644
-       next
+ACTION == remove, DEVPATH is set, MAJOR is set, MINOR is set {
+       remove /dev/%DEVNAME%
 }
 
-DEVPATH is set {
-       nothrottle
-       makedev /dev/%DEVICENAME% 0644
+FIRMWARE is set, ACTION == add {
+       exec /sbin/hotplug-call firmware
+       load-firmware /lib/firmware
+       next-event
 }
 
-FIRMWARE is set {
-       nothrottle
-       exec /sbin/hotplug-call firmware;
-       next
+SUBSYSTEM == platform {
+       exec /sbin/hotplug-call %SUBSYSTEM%
 }