mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 02:29:01 +00:00
32ebaf0cec
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36001
81 lines
1.5 KiB
JSON
81 lines
1.5 KiB
JSON
[
|
|
[ "case", "ACTION", {
|
|
"add": [
|
|
[ "if",
|
|
[ "and",
|
|
[ "has", "MAJOR" ],
|
|
[ "has", "MINOR" ],
|
|
],
|
|
[
|
|
[ "if",
|
|
[ "or",
|
|
[ "eq", "DEVNAME",
|
|
[ "null", "full", "ptmx", "zero" ],
|
|
],
|
|
[ "regex", "DEVNAME",
|
|
[ "^gpio", "^hvc", "^tty" ],
|
|
],
|
|
],
|
|
[
|
|
[ "makedev", "/dev/%DEVNAME%", "0666" ],
|
|
[ "return" ],
|
|
]
|
|
],
|
|
[ "if",
|
|
[ "or",
|
|
[ "eq", "DEVNAME", "mapper/control" ],
|
|
[ "regex", "DEVPATH", "^ppp" ],
|
|
],
|
|
[
|
|
[ "makedev", "/dev/%DEVNAME%", "0600" ],
|
|
[ "return" ],
|
|
],
|
|
],
|
|
[ "if",
|
|
[ "has", "DEVNAME" ],
|
|
[
|
|
[ "makedev", "/dev/%DEVNAME%", "0644" ],
|
|
[ "return" ],
|
|
],
|
|
],
|
|
],
|
|
],
|
|
[ "if",
|
|
[ "has", "FIRMWARE" ],
|
|
[
|
|
[ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ],
|
|
[ "load-firmware", "/lib/firmware" ],
|
|
[ "return" ]
|
|
]
|
|
],
|
|
],
|
|
"remove" : [
|
|
[ "if",
|
|
[ "and",
|
|
[ "has", "DEVNAME" ],
|
|
[ "has", "MAJOR" ],
|
|
[ "has", "MINOR" ],
|
|
],
|
|
[ "rm", "/dev/%DEVNAME%" ]
|
|
]
|
|
]
|
|
} ],
|
|
[ "if",
|
|
[ "eq", "SUBSYSTEM", "platform" ],
|
|
[ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
|
|
],
|
|
[ "if",
|
|
[ "and",
|
|
[ "has", "BUTTON" ],
|
|
[ "eq", "SUBSYSTEM", "button" ],
|
|
],
|
|
[ "exec", "/etc/rc.button/%BUTTON%" ]
|
|
],
|
|
[ "if",
|
|
[ "eq", "SUBSYSTEM",
|
|
[ "net", "input", "usb", "ieee1394", "block", "atm", "zaptel", "tty" ]
|
|
],
|
|
[ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
|
|
],
|
|
]
|