procd: change /dev/{gpio,hvc*} perms to 0600
[openwrt/openwrt.git] / package / system / procd / files / hotplug.json
index 57fc40e54493c25d531b099f1ac38c24561bb896..85fbb144cc3342c98485320e57572adbb893337f 100644 (file)
@@ -8,13 +8,8 @@
                                ],
                                [
                                        [ "if",
-                                               [ "or",
-                                                       [ "eq", "DEVNAME",
-                                                               [ "null", "full", "ptmx", "zero" ],
-                                                       ],
-                                                       [ "regex", "DEVNAME",
-                                                               [ "^gpio", "^hvc" ],
-                                                       ],
+                                               [ "eq", "DEVNAME",
+                                                       [ "null", "full", "ptmx", "zero", "tty", "net", "random", "urandom" ],
                                                ],
                                                [
                                                        [ "makedev", "/dev/%DEVNAME%", "0666" ],
                                                ]
                                        ],
                                        [ "if",
-                                               [ "or",
-                                                       [ "eq", "DEVNAME", "mapper/control" ],
-                                                       [ "regex", "DEVPATH", "^ppp" ],
-                                               ],
-                                               [
-                                                       [ "makedev", "/dev/%DEVNAME%", "0600" ],
-                                                       [ "return" ],
-                                               ],
+                                               [ "eq", "DEVNAME", "kmsg" ],
+                                               [ "makedev", "/dev/%DEVNAME%", "0644" ],
+                                       ],
+                                       [ "if",
+                                               [ "regex", "DEVNAME", "^snd" ],
+                                               [ "makedev", "/dev/%DEVNAME%", "0660", "audio" ],
                                        ],
                                        [ "if",
                                                [ "has", "DEVNAME" ],
-                                               [ "makedev", "/dev/%DEVNAME%", "0644" ],
+                                               [ "makedev", "/dev/%DEVNAME%", "0600" ],
                                        ],
                                ],
                        ],
                        ]
                ]
        } ],
-       [ "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", "button" ]
-               ],
-               [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
+               [ "button", "/etc/rc.button/%BUTTON%" ]
        ],
        [ "if",
                [ "and",
                        [ "eq", "SUBSYSTEM", "usb-serial" ],
                        [ "regex", "DEVNAME",
                                [ "^ttyUSB", "^ttyACM" ]
-                       ],
+                       ]
                ],
-               [ "exec", "/sbin/hotplug-call", "tty" ]
+               [ "exec", "/sbin/hotplug-call", "tty" ],
+               [ "if",
+                       [ "isdir", "/etc/hotplug.d/%SUBSYSTEM%" ],
+                       [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
+               ]
        ],
 ]