From 1ce7b5d12def555c10776b822a44c4419150b386 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Wed, 13 Mar 2013 18:11:07 +0000 Subject: [procd] update to latest git head Signed-off-by: John Crispin git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36001 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/procd/files/hotplug-preinit.json | 21 +++++++++ package/procd/files/hotplug.json | 80 ++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 package/procd/files/hotplug-preinit.json create mode 100644 package/procd/files/hotplug.json (limited to 'package/procd/files') diff --git a/package/procd/files/hotplug-preinit.json b/package/procd/files/hotplug-preinit.json new file mode 100644 index 0000000000..d212b22fac --- /dev/null +++ b/package/procd/files/hotplug-preinit.json @@ -0,0 +1,21 @@ +[ + [ "case", "ACTION", { + "add": [ + [ "if", + [ "has", "FIRMWARE" ], + [ + [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ], + [ "load-firmware", "/lib/firmware" ], + [ "return" ] + ] + ], + ], + }, ], + [ "if", + [ "and", + [ "eq", "SUBSYSTEM", "button" ], + [ "eq", "BUTTON", "reset" ], + ], + [ "exec", "/etc/rc.button/failsafe" ] + ], +] diff --git a/package/procd/files/hotplug.json b/package/procd/files/hotplug.json new file mode 100644 index 0000000000..43fec0c0d3 --- /dev/null +++ b/package/procd/files/hotplug.json @@ -0,0 +1,80 @@ +[ + [ "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" ], + [ "return" ], + ], + ], + ], + ], + [ "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