]> git.ipfire.org Git - thirdparty/systemd.git/blame - rules/rules.d/60-persistent-input.rules
rule_generator: net - fix usb comment generation
[thirdparty/systemd.git] / rules / rules.d / 60-persistent-input.rules
CommitLineData
4beaed36
KS
1# do not edit this file, it will be overwritten on update
2
58cfbcae 3ACTION!="add|change", GOTO="persistent_input_end"
521e3f78
KS
4SUBSYSTEM!="input", GOTO="persistent_input_end"
5KERNEL=="input[0-9]*", GOTO="persistent_input_end"
6
7# usb devices
7e827bcd 8SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export %p"
775f5e35
KS
9SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="01", ENV{ID_CLASS}="kbd"
10SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="02", ENV{ID_CLASS}="mouse"
521e3f78
KS
11
12# other devices
775f5e35
KS
13DRIVERS=="pcspkr", ENV{ID_CLASS}="spkr"
14DRIVERS=="atkbd", ENV{ID_CLASS}="kbd"
15DRIVERS=="psmouse", ENV{ID_CLASS}="mouse"
16ATTRS{name}=="*dvb*|*DVB*|* IR *", ENV{ID_CLASS}="ir"
a689165b 17# joystick (ABS_X || ABS_WHEEL || ABS_THROTTLE) && !BTN_TOUCH
775f5e35 18ATTRS{modalias}=="input:*-*a[068],*|input:*-*a*,[68],*m*", ATTRS{modalias}!="input:*-*k*14A,*r*", ENV{ID_CLASS}="joystick"
521e3f78 19
0809c264
KS
20# fill empty serial number
21ENV{ID_CLASS}=="?*", ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial"
521e3f78
KS
22
23# by-id links
878645dc 24KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_CLASS}"
521e3f78
KS
25KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{ID_CLASS}"
26
27# by-path
28IMPORT{program}="path_id %p"
01acecef
KS
29ENV{ID_PATH}=="?*", KERNEL=="mouse*|js*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{ID_CLASS}"
30ENV{ID_PATH}=="?*", KERNEL=="event*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{ID_CLASS}"
521e3f78
KS
31
32LABEL="persistent_input_end"
33