2007-12-02 01:08:04 +08:00
|
|
|
|
2010-04-11 02:35:14 +08:00
|
|
|
# uncomment me to log hotplug events
|
|
|
|
# DEVPATH is set {
|
|
|
|
# exec logger -s -t hotplug -p daemon.info "name=%DEVICENAME%, path=%DEVPATH%"
|
|
|
|
# }
|
|
|
|
|
2011-02-08 06:28:09 +08:00
|
|
|
$include /etc/hotplug2-platform.rules
|
|
|
|
|
2011-05-04 03:37:59 +08:00
|
|
|
DEVICENAME ~~ (^null$|^full$|^ptmx$|^zero$|^gpio|^hvc) {
|
2007-12-02 01:08:04 +08:00
|
|
|
makedev /dev/%DEVICENAME% 0666
|
2011-02-01 06:29:31 +08:00
|
|
|
next-event
|
2007-12-02 01:08:04 +08:00
|
|
|
}
|
|
|
|
|
2011-02-02 00:37:53 +08:00
|
|
|
DEVICENAME ~~ (^tun|^tap[0-9]$) {
|
2007-12-02 01:08:04 +08:00
|
|
|
makedev /dev/net/%DEVICENAME% 0644
|
|
|
|
}
|
|
|
|
|
2011-02-02 09:23:34 +08:00
|
|
|
DEVICENAME ~~ (^controlC[0-9]$|^pcmC[0-9]D[0-9]|^timer$) {
|
2007-12-02 01:08:04 +08:00
|
|
|
makedev /dev/snd/%DEVICENAME% 0644
|
2011-02-01 06:29:31 +08:00
|
|
|
next-event
|
2007-12-02 01:08:04 +08:00
|
|
|
}
|
|
|
|
|
2011-02-02 00:37:53 +08:00
|
|
|
DEVICENAME ~~ ^lp[0-9]$ {
|
2009-09-29 04:05:50 +08:00
|
|
|
makedev /dev/%DEVICENAME% 0644
|
2011-02-01 06:29:31 +08:00
|
|
|
next-event
|
2009-09-29 04:05:50 +08:00
|
|
|
}
|
|
|
|
|
2011-02-02 00:37:53 +08:00
|
|
|
DEVPATH is set, SUBSYSTEM == input {
|
2009-03-09 23:06:15 +08:00
|
|
|
makedev /dev/input/%DEVICENAME% 0644
|
|
|
|
}
|
|
|
|
|
2010-02-12 09:37:02 +08:00
|
|
|
DEVICENAME == device-mapper {
|
2010-04-04 02:21:02 +08:00
|
|
|
makedev /dev/mapper/control 0600
|
2011-05-04 03:37:59 +08:00
|
|
|
next-event
|
2010-02-12 09:37:02 +08:00
|
|
|
}
|
|
|
|
|
2011-05-04 03:37:59 +08:00
|
|
|
ACTION == add, DEVPATH is set {
|
2007-12-02 01:08:04 +08:00
|
|
|
makedev /dev/%DEVICENAME% 0644
|
|
|
|
}
|
|
|
|
|
2011-05-04 03:37:59 +08:00
|
|
|
ACTION == add, DEVPATH is set, DEVICENAME ~~ ^tty {
|
|
|
|
chmod 0666 /dev/%DEVICENAME%
|
|
|
|
}
|
|
|
|
|
|
|
|
ACTION == add, DEVPATH is set, DEVICENAME ~~ ^ppp {
|
|
|
|
chmod 0600 /dev/%DEVICENAME%
|
|
|
|
}
|
|
|
|
|
|
|
|
ACTION == remove, DEVPATH is set, MAJOR is set, MINOR is set {
|
|
|
|
remove /dev/%DEVICENAME%
|
|
|
|
}
|
|
|
|
|
2010-04-04 02:21:02 +08:00
|
|
|
FIRMWARE is set, ACTION == add {
|
2011-02-06 22:35:07 +08:00
|
|
|
exec /sbin/hotplug-call firmware
|
2010-04-04 02:21:02 +08:00
|
|
|
load-firmware /lib/firmware
|
2011-02-01 06:29:31 +08:00
|
|
|
next-event
|
2007-12-02 01:08:04 +08:00
|
|
|
}
|
2011-11-06 01:16:01 +08:00
|
|
|
|
|
|
|
SUBSYSTEM == platform {
|
|
|
|
exec /sbin/hotplug-call %SUBSYSTEM%
|
|
|
|
}
|