Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
88
package/system/procd/files/hotplug.json
Normal file
88
package/system/procd/files/hotplug.json
Normal file
@@ -0,0 +1,88 @@
|
||||
[
|
||||
[ "case", "ACTION", {
|
||||
"add": [
|
||||
[ "if",
|
||||
[ "and",
|
||||
[ "has", "MAJOR" ],
|
||||
[ "has", "MINOR" ]
|
||||
],
|
||||
[
|
||||
[ "if",
|
||||
[ "eq", "DEVNAME", "null" ],
|
||||
[
|
||||
[ "makedev", "/dev/%DEVNAME%", "0666" ],
|
||||
[ "exec", "/bin/ln", "-s", "/proc/self/fd", "/dev/fd" ],
|
||||
[ "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" ]
|
||||
]
|
||||
],
|
||||
[ "if",
|
||||
[ "eq", "DEVNAME",
|
||||
[ "full", "ptmx", "zero", "tty", "net", "random", "urandom" ]
|
||||
],
|
||||
[
|
||||
[ "makedev", "/dev/%DEVNAME%", "0666" ],
|
||||
[ "return" ]
|
||||
]
|
||||
],
|
||||
[ "if",
|
||||
[ "regex", "DEVNAME", "^snd" ],
|
||||
[ "makedev", "/dev/%DEVNAME%", "0660", "audio" ]
|
||||
],
|
||||
[ "if",
|
||||
[ "regex", "DEVNAME", "^tty" ],
|
||||
[ "makedev", "/dev/%DEVNAME%", "0660", "dialout" ]
|
||||
],
|
||||
[ "if",
|
||||
[ "has", "DEVNAME" ],
|
||||
[ "makedev", "/dev/%DEVNAME%", "0600" ]
|
||||
]
|
||||
]
|
||||
],
|
||||
[ "if",
|
||||
[ "has", "FIRMWARE" ],
|
||||
[
|
||||
[ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ],
|
||||
[ "load-firmware", "/lib/firmware" ],
|
||||
[ "return" ]
|
||||
]
|
||||
],
|
||||
[ "if",
|
||||
[ "regex", "DEVNAME", "^ttyGS" ],
|
||||
[ "start-console", "%DEVNAME%" ]
|
||||
]
|
||||
],
|
||||
"remove" : [
|
||||
[ "if",
|
||||
[ "and",
|
||||
[ "has", "DEVNAME" ],
|
||||
[ "has", "MAJOR" ],
|
||||
[ "has", "MINOR" ]
|
||||
],
|
||||
[ "rm", "/dev/%DEVNAME%" ]
|
||||
]
|
||||
]
|
||||
} ],
|
||||
[ "if",
|
||||
[ "and",
|
||||
[ "has", "BUTTON" ],
|
||||
[ "eq", "SUBSYSTEM", "button" ]
|
||||
],
|
||||
[ "button", "/etc/rc.button/%BUTTON%" ]
|
||||
],
|
||||
[ "if",
|
||||
[ "and",
|
||||
[ "eq", "SUBSYSTEM", "usb-serial" ],
|
||||
[ "regex", "DEVNAME",
|
||||
[ "^ttyUSB", "^ttyACM" ]
|
||||
]
|
||||
],
|
||||
[ "exec", "/sbin/hotplug-call", "tty" ],
|
||||
[ "if",
|
||||
[ "isdir", "/etc/hotplug.d/%SUBSYSTEM%" ],
|
||||
[ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
|
||||
]
|
||||
]
|
||||
]
|
||||
Reference in New Issue
Block a user