/etc/init.d/lirc requires TRANSMITTER_DEVICE to be set in hardware.conf
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lirc (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Currently /etc/init.d/lirc requires TRANSMITTER_DEVICE to be set by hand (or during debconf) to load the transmitter's daemon. Additionally, if a remote is being used in conjunction with a transmitter, REMOTE_DEVICE needs to be set as well to have both daemons load properly.
There are two approaches to fix this problem:
1. Modify debconf for lirc.
TRANSMITTER_DEVICE and REMOTE_DEVICE will vary depending on the order in which the modules are loaded. Currently the modules are loaded Remote, Transmitter (from /etc/init.d/lirc). If this remains the case, REMOTE_DEVICE should be /dev/lirc0 (if being used) while TRANSMITTER_DEVICE should be /dev/lirc0 (if no remote is being used) or /dev/lirc1 (if a remote is being used).
2. Modify /etc/init.d/lirc
The same logic described above can be used to "guess" the values of REMOTE_DEVICE and TRANSMITTER_DEVICE if they are not set. This may be the easier fix to apply because it only would require some additional bash scripting.
Anybody with a recommendation on "best practices" here? I will gladly modify the init script and post a diff if I know it is going to be used.
Another note:
If TRANSMITTER_DEVICE is set, REMOTE_DEVICE also needs to be set since the init script will not attempt to guess REMOTE_DEVICE if more than one device is being loaded.