2013-03-13 18:11:07 +00:00
|
|
|
[
|
|
|
|
[ "case", "ACTION", {
|
|
|
|
"add": [
|
|
|
|
[ "if",
|
|
|
|
[ "and",
|
|
|
|
[ "has", "MAJOR" ],
|
2017-08-18 13:06:25 +00:00
|
|
|
[ "has", "MINOR" ]
|
2013-03-13 18:11:07 +00:00
|
|
|
],
|
|
|
|
[
|
2021-11-18 12:00:09 +00:00
|
|
|
[ "if",
|
|
|
|
[ "eq", "DEVNAME", "null" ],
|
|
|
|
[
|
|
|
|
[ "makedev", "/dev/%DEVNAME%", "0666" ],
|
2023-09-06 10:33:17 +00:00
|
|
|
[ "exec", "/bin/ln", "-s", "/proc/self/fd", "/dev/fd" ],
|
2021-11-18 12:00:09 +00:00
|
|
|
[ "exec", "/bin/ln", "-s", "/proc/self/fd/0", "/dev/stdin" ],
|
|
|
|
[ "exec", "/bin/ln", "-s", "/proc/self/fd/1", "/dev/stdout" ],
|
|
|
|
[ "exec", "/bin/ln", "-s", "/proc/self/fd/2", "/dev/stderr" ],
|
|
|
|
[ "return" ]
|
|
|
|
]
|
|
|
|
],
|
2013-03-13 18:11:07 +00:00
|
|
|
[ "if",
|
2016-06-29 13:44:30 +00:00
|
|
|
[ "eq", "DEVNAME",
|
2021-11-18 12:00:09 +00:00
|
|
|
[ "full", "ptmx", "zero", "tty", "net", "random", "urandom" ]
|
2013-03-13 18:11:07 +00:00
|
|
|
],
|
|
|
|
[
|
|
|
|
[ "makedev", "/dev/%DEVNAME%", "0666" ],
|
2017-08-18 13:06:25 +00:00
|
|
|
[ "return" ]
|
2013-03-13 18:11:07 +00:00
|
|
|
]
|
|
|
|
],
|
2016-06-16 09:52:29 +00:00
|
|
|
[ "if",
|
|
|
|
[ "regex", "DEVNAME", "^snd" ],
|
2017-08-18 13:06:25 +00:00
|
|
|
[ "makedev", "/dev/%DEVNAME%", "0660", "audio" ]
|
2017-06-10 18:51:33 +00:00
|
|
|
],
|
2019-04-02 19:48:11 +00:00
|
|
|
[ "if",
|
|
|
|
[ "regex", "DEVNAME", "^tty" ],
|
|
|
|
[ "makedev", "/dev/%DEVNAME%", "0660", "dialout" ]
|
|
|
|
],
|
2013-03-13 18:11:07 +00:00
|
|
|
[ "if",
|
|
|
|
[ "has", "DEVNAME" ],
|
2017-08-18 13:06:25 +00:00
|
|
|
[ "makedev", "/dev/%DEVNAME%", "0600" ]
|
|
|
|
]
|
|
|
|
]
|
2013-03-13 18:11:07 +00:00
|
|
|
],
|
|
|
|
[ "if",
|
|
|
|
[ "has", "FIRMWARE" ],
|
|
|
|
[
|
|
|
|
[ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ],
|
|
|
|
[ "load-firmware", "/lib/firmware" ],
|
|
|
|
[ "return" ]
|
|
|
|
]
|
2019-11-04 23:39:40 +00:00
|
|
|
],
|
|
|
|
[ "if",
|
|
|
|
[ "regex", "DEVNAME", "^ttyGS" ],
|
|
|
|
[ "start-console", "%DEVNAME%" ]
|
2017-08-18 13:06:25 +00:00
|
|
|
]
|
2013-03-13 18:11:07 +00:00
|
|
|
],
|
|
|
|
"remove" : [
|
|
|
|
[ "if",
|
|
|
|
[ "and",
|
|
|
|
[ "has", "DEVNAME" ],
|
|
|
|
[ "has", "MAJOR" ],
|
2017-08-18 13:06:25 +00:00
|
|
|
[ "has", "MINOR" ]
|
2013-03-13 18:11:07 +00:00
|
|
|
],
|
|
|
|
[ "rm", "/dev/%DEVNAME%" ]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
} ],
|
|
|
|
[ "if",
|
|
|
|
[ "and",
|
|
|
|
[ "has", "BUTTON" ],
|
2017-08-18 13:06:25 +00:00
|
|
|
[ "eq", "SUBSYSTEM", "button" ]
|
2013-03-13 18:11:07 +00:00
|
|
|
],
|
2015-08-10 22:48:07 +00:00
|
|
|
[ "button", "/etc/rc.button/%BUTTON%" ]
|
2013-03-13 18:11:07 +00:00
|
|
|
],
|
2013-11-19 00:03:42 +00:00
|
|
|
[ "if",
|
|
|
|
[ "and",
|
2014-06-07 11:54:13 +00:00
|
|
|
[ "eq", "SUBSYSTEM", "usb-serial" ],
|
|
|
|
[ "regex", "DEVNAME",
|
|
|
|
[ "^ttyUSB", "^ttyACM" ]
|
2016-02-26 08:35:43 +00:00
|
|
|
]
|
2013-03-13 18:11:07 +00:00
|
|
|
],
|
2016-02-26 08:35:43 +00:00
|
|
|
[ "exec", "/sbin/hotplug-call", "tty" ],
|
|
|
|
[ "if",
|
|
|
|
[ "isdir", "/etc/hotplug.d/%SUBSYSTEM%" ],
|
|
|
|
[ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
|
|
|
|
]
|
2017-08-18 13:06:25 +00:00
|
|
|
]
|
2013-03-13 18:11:07 +00:00
|
|
|
]
|