[ "if",
[ "and",
[ "has", "MAJOR" ],
- [ "has", "MINOR" ],
+ [ "has", "MINOR" ]
],
[
[ "if",
- [ "or",
- [ "eq", "DEVNAME",
- [ "null", "full", "ptmx", "zero" ],
- ],
- [ "regex", "DEVNAME",
- [ "^gpio", "^hvc" ],
- ],
- ],
+ [ "eq", "DEVNAME", "null" ],
[
[ "makedev", "/dev/%DEVNAME%", "0666" ],
- [ "return" ],
+ [ "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",
- [ "or",
- [ "eq", "DEVNAME", "mapper/control" ],
- [ "regex", "DEVPATH", "^ppp" ],
+ [ "eq", "DEVNAME",
+ [ "full", "ptmx", "zero", "tty", "net", "random", "urandom" ]
],
[
- [ "makedev", "/dev/%DEVNAME%", "0600" ],
- [ "return" ],
- ],
+ [ "makedev", "/dev/%DEVNAME%", "0666" ],
+ [ "return" ]
+ ]
],
[ "if",
- [ "has", "DEVNAME" ],
- [ "makedev", "/dev/%DEVNAME%", "0644" ],
+ [ "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" ],
[ "return" ]
]
],
+ [ "if",
+ [ "regex", "DEVNAME", "^ttyGS" ],
+ [ "start-console", "%DEVNAME%" ]
+ ]
],
"remove" : [
[ "if",
[ "and",
[ "has", "DEVNAME" ],
[ "has", "MAJOR" ],
- [ "has", "MINOR" ],
+ [ "has", "MINOR" ]
],
[ "rm", "/dev/%DEVNAME%" ]
]
]
} ],
- [ "if",
- [ "eq", "SUBSYSTEM", "platform" ],
- [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
- ],
[ "if",
[ "and",
[ "has", "BUTTON" ],
- [ "eq", "SUBSYSTEM", "button" ],
+ [ "eq", "SUBSYSTEM", "button" ]
],
[ "button", "/etc/rc.button/%BUTTON%" ]
],
- [ "if",
- [ "eq", "SUBSYSTEM",
- [ "net", "input", "usb", "usbmisc", "ieee1394", "block", "atm", "zaptel", "tty", "button", "sound" ]
- ],
- [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
- ],
[ "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%" ]
+ ]
+ ]
]