aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2017-08-16 12:41:53 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-08-20 09:27:01 -0400
commite440918467868a5f3e7f73f54ef2cbd85d68f3f1 (patch)
tree10ebf9cec08e2e97952fe33d0a789d9b7ac07d6f
parente025baf98e67ce5139fbb745ca7a6e91b7ce8ca5 (diff)
ir-keytable: ensure udev rule fires on rc input device
The rc device is created before the input device, so if ir-keytable runs too quickly the input device does not exist yet. This also prevents udev from starting ir-keytable on an transmit only device, which has no input device. Note that $id in RUN will not work, since that is expanded after all the rules are matched, at which point the the parent might have been changed by another match in another rule. The argument to $env{key} is expanded immediately. Reported-by: Matthias Reichl <hias@horus.com> Signed-off-by: Sean Young <sean@mess.org>
-rw-r--r--utils/keytable/70-infrared.rules2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/keytable/70-infrared.rules b/utils/keytable/70-infrared.rules
index afffd951..41ca2089 100644
--- a/utils/keytable/70-infrared.rules
+++ b/utils/keytable/70-infrared.rules
@@ -1,4 +1,4 @@
# Automatically load the proper keymaps after the Remote Controller device
# creation. The keycode tables rules should be at /etc/rc_maps.cfg
-ACTION=="add", SUBSYSTEM=="rc", RUN+="/usr/bin/ir-keytable -a /etc/rc_maps.cfg -s $name"
+ACTION=="add", SUBSYSTEM=="input", SUBSYSTEMS=="rc", KERNEL=="event*", ENV{.rc_sysdev}="$id", RUN+="/usr/bin/ir-keytable -a /etc/rc_maps.cfg -s $env{.rc_sysdev}"

Privacy Policy