rules: move input_id rule to a separate file
authorMichal Suchanek <msuchanek@suse.de>
Mon, 12 Jun 2017 11:43:05 +0000 (13:43 +0200)
committerMichal Suchanek <msuchanek@suse.de>
Tue, 27 Jun 2017 11:28:10 +0000 (13:28 +0200)
This places the input_id call after the evdev hwdb calls. With this the
hwdb fixups in evdev can affect the device capabilities assigned in
input_id.

Remove the ID_INPUT_KEY dependency in atkbd rule because it is now not
assigned at this point.

Makefile.am
rules/50-udev-default.rules.in
rules/60-evdev.rules
rules/60-input-id.rules [new file with mode: 0644]

index 86343ee..9fc2faf 100644 (file)
@@ -3887,6 +3887,7 @@ dist_udevrules_DATA += \
 
 nodist_udevrules_DATA += \
        rules/50-udev-default.rules \
+       rules/60-input-id.rules \
        rules/99-systemd.rules
 
 udevconfdir = $(sysconfdir)/udev
index e556533..898148c 100644 (file)
@@ -11,7 +11,6 @@ SUBSYSTEM=="rtc", ATTR{hctosys}=="1", SYMLINK+="rtc"
 SUBSYSTEM=="rtc", KERNEL=="rtc0", SYMLINK+="rtc", OPTIONS+="link_priority=-100"
 
 SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb"
-SUBSYSTEM=="input", ENV{ID_INPUT}=="", IMPORT{builtin}="input_id"
 ENV{MODALIAS}!="", IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}"
 
 ACTION!="add", GOTO="default_end"
index f5d5ba6..e5e608a 100644 (file)
@@ -8,7 +8,7 @@ IMPORT{builtin}="hwdb --subsystem=input --lookup-prefix=evdev:", \
   RUN{builtin}+="keyboard", GOTO="evdev_end"
 
 # AT keyboard matching by the machine's DMI data
-ENV{ID_INPUT_KEY}=="?*", DRIVERS=="atkbd", \
+DRIVERS=="atkbd", \
   IMPORT{builtin}="hwdb 'evdev:atkbd:$attr{[dmi/id]modalias}'", \
   RUN{builtin}+="keyboard", GOTO="evdev_end"
 
diff --git a/rules/60-input-id.rules b/rules/60-input-id.rules
new file mode 100644 (file)
index 0000000..dee4219
--- /dev/null
@@ -0,0 +1,7 @@
+# do not edit this file, it will be overwritten on update
+
+ACTION=="remove", GOTO="id_input_end"
+
+SUBSYSTEM=="input", ENV{ID_INPUT}=="", IMPORT{builtin}="input_id"
+
+LABEL="id_input_end"