mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-20 22:01:38 +00:00
26845a4715
This allows requesting "timeout" ACTION in script by returning a positive value. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 46580
87 lines
1.6 KiB
JSON
87 lines
1.6 KiB
JSON
[
|
|
[ "case", "ACTION", {
|
|
"add": [
|
|
[ "if",
|
|
[ "and",
|
|
[ "has", "MAJOR" ],
|
|
[ "has", "MINOR" ],
|
|
],
|
|
[
|
|
[ "if",
|
|
[ "or",
|
|
[ "eq", "DEVNAME",
|
|
[ "null", "full", "ptmx", "zero" ],
|
|
],
|
|
[ "regex", "DEVNAME",
|
|
[ "^gpio", "^hvc" ],
|
|
],
|
|
],
|
|
[
|
|
[ "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" ],
|
|
],
|
|
],
|
|
],
|
|
[ "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" ],
|
|
],
|
|
[ "button", "/etc/rc.button/%BUTTON%" ]
|
|
],
|
|
[ "if",
|
|
[ "eq", "SUBSYSTEM",
|
|
[ "net", "input", "usb", "usbmisc", "ieee1394", "block", "atm", "zaptel", "tty", "button" ]
|
|
],
|
|
[ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
|
|
],
|
|
[ "if",
|
|
[ "and",
|
|
[ "eq", "SUBSYSTEM", "usb-serial" ],
|
|
[ "regex", "DEVNAME",
|
|
[ "^ttyUSB", "^ttyACM" ]
|
|
],
|
|
],
|
|
[ "exec", "/sbin/hotplug-call", "tty" ]
|
|
],
|
|
]
|