[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to assign a persistent device name to an infra-red receiver?



On 06/01/14 23:53, Ernest Adrogué wrote:
> Hi there
> 
> I have configured lirc to use /dev/input/event4 but it turns out this device
> name is assigned to a different input device every time the computer boots,
> thus preventing lirc from working properly.
> 
> For example, right now the receiver is on /dev/input/event5.  I guess I have
> to write a udev rule for this but when I look at
> /lib/udev/rules.d/60-persistent-input.rules I am a little confused.  Do I
> have to modify this file directly, copy it to /etc/ and edit that copy, run
> some script...?
> 
> Regards.
> 
> 


*-persistent*.rules should *not* be modified because changes may create
problems with upgrades (or later package install (they are automagically
created by *-generator scripts). Instead create a rule that is processed
before /lib/udev/rules.d/60-persistent-input.rules and targets that
exact device (the IR device).
udev rules are processed in lexical order and /etc/udev/rules.d/ have
precedence over rules in /lib/udev/rules.d (which has precedence over
rules in /run/udev/rules.d)

e.g. /etc/udev/rules.d/59-irda-custom.rules

(I like to put "custom" into the name of customized rules and config
files to make it easier to backup the modifications).

Useful refs:-
;man udev
;http://www.reactivated.net/writing_udev_rules.html

Kind regards


Reply to: