101d4512fb798051d1413e20f730bce15a926bf0
[openwrt/svn-archive/archive.git] / package / base-files / files / etc / hotplug2-common.rules
1
2 # uncomment me to log hotplug events
3 # DEVPATH is set {
4 # exec logger -s -t hotplug -p daemon.info "name=%DEVICENAME%, path=%DEVPATH%"
5 # }
6
7 $include /etc/hotplug2-platform.rules
8
9 DEVICENAME ~~ (^null$|^full$|^ptmx$|^zero$|^gpio|^hvc) {
10 makedev /dev/%DEVICENAME% 0666
11 next-event
12 }
13
14 DEVICENAME ~~ (^tun|^tap[0-9]$) {
15 makedev /dev/net/%DEVICENAME% 0644
16 }
17
18 DEVICENAME ~~ (^controlC[0-9]$|^pcmC[0-9]D[0-9]|^timer$) {
19 makedev /dev/snd/%DEVICENAME% 0644
20 next-event
21 }
22
23 DEVICENAME ~~ ^lp[0-9]$ {
24 makedev /dev/%DEVICENAME% 0644
25 next-event
26 }
27
28 DEVPATH is set, SUBSYSTEM == input {
29 makedev /dev/input/%DEVICENAME% 0644
30 }
31
32 DEVICENAME == device-mapper {
33 makedev /dev/mapper/control 0600
34 next-event
35 }
36
37 ACTION == add, DEVPATH is set {
38 makedev /dev/%DEVICENAME% 0644
39 }
40
41 ACTION == add, DEVPATH is set, DEVICENAME ~~ ^tty {
42 chmod 0666 /dev/%DEVICENAME%
43 }
44
45 ACTION == add, DEVPATH is set, DEVICENAME ~~ ^ppp {
46 chmod 0600 /dev/%DEVICENAME%
47 }
48
49 ACTION == remove, DEVPATH is set, MAJOR is set, MINOR is set {
50 remove /dev/%DEVICENAME%
51 }
52
53 FIRMWARE is set, ACTION == add {
54 exec /sbin/hotplug-call firmware
55 load-firmware /lib/firmware
56 next-event
57 }