From 4ebf19b48fafc8d94e14e4ba779969613b241a6a Mon Sep 17 00:00:00 2001 From: John Crispin Date: Fri, 21 Jun 2013 16:54:37 +0000 Subject: packages: clean up the package folder Signed-off-by: John Crispin SVN-Revision: 37007 --- package/system/procd/files/hotplug.json | 77 +++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 package/system/procd/files/hotplug.json (limited to 'package/system/procd/files/hotplug.json') diff --git a/package/system/procd/files/hotplug.json b/package/system/procd/files/hotplug.json new file mode 100644 index 0000000000..c1b45c6e86 --- /dev/null +++ b/package/system/procd/files/hotplug.json @@ -0,0 +1,77 @@ +[ + [ "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" ], + ], + ], + ], + [ "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%" ] + ], +] -- cgit v1.2.3