procd: fix hotplug.json syntax

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
Florian Eckert 2017-08-18 15:06:25 +02:00 committed by John Crispin
parent a307480e2d
commit 5209cfa534

View File

@ -4,31 +4,27 @@
[ "if", [ "if",
[ "and", [ "and",
[ "has", "MAJOR" ], [ "has", "MAJOR" ],
[ "has", "MINOR" ], [ "has", "MINOR" ]
], ],
[ [
[ "if", [ "if",
[ "eq", "DEVNAME", [ "eq", "DEVNAME",
[ "null", "full", "ptmx", "zero", "tty", "net", "random", "urandom" ], [ "null", "full", "ptmx", "zero", "tty", "net", "random", "urandom" ]
], ],
[ [
[ "makedev", "/dev/%DEVNAME%", "0666" ], [ "makedev", "/dev/%DEVNAME%", "0666" ],
[ "return" ], [ "return" ]
] ]
], ],
[ "if", [ "if",
[ "regex", "DEVNAME", "^snd" ], [ "regex", "DEVNAME", "^snd" ],
[ "makedev", "/dev/%DEVNAME%", "0660", "audio" ], [ "makedev", "/dev/%DEVNAME%", "0660", "audio" ]
],
[ "if",
[ "regex", "DEVNAME", "^tty" ],
[ "makedev", "/dev/%DEVNAME%", "0660", "tty" ],
], ],
[ "if", [ "if",
[ "has", "DEVNAME" ], [ "has", "DEVNAME" ],
[ "makedev", "/dev/%DEVNAME%", "0600" ], [ "makedev", "/dev/%DEVNAME%", "0600" ]
], ]
], ]
], ],
[ "if", [ "if",
[ "has", "FIRMWARE" ], [ "has", "FIRMWARE" ],
@ -37,14 +33,14 @@
[ "load-firmware", "/lib/firmware" ], [ "load-firmware", "/lib/firmware" ],
[ "return" ] [ "return" ]
] ]
], ]
], ],
"remove" : [ "remove" : [
[ "if", [ "if",
[ "and", [ "and",
[ "has", "DEVNAME" ], [ "has", "DEVNAME" ],
[ "has", "MAJOR" ], [ "has", "MAJOR" ],
[ "has", "MINOR" ], [ "has", "MINOR" ]
], ],
[ "rm", "/dev/%DEVNAME%" ] [ "rm", "/dev/%DEVNAME%" ]
] ]
@ -53,7 +49,7 @@
[ "if", [ "if",
[ "and", [ "and",
[ "has", "BUTTON" ], [ "has", "BUTTON" ],
[ "eq", "SUBSYSTEM", "button" ], [ "eq", "SUBSYSTEM", "button" ]
], ],
[ "button", "/etc/rc.button/%BUTTON%" ] [ "button", "/etc/rc.button/%BUTTON%" ]
], ],
@ -69,5 +65,5 @@
[ "isdir", "/etc/hotplug.d/%SUBSYSTEM%" ], [ "isdir", "/etc/hotplug.d/%SUBSYSTEM%" ],
[ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ] [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
] ]
], ]
] ]