Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 287731 - lirc-0.8.6-r1: Breaks multiple instances
Summary: lirc-0.8.6-r1: Breaks multiple instances
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Television related Applications in Gentoo's Portage
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-05 09:17 UTC by James Le Cuirot
Modified: 2012-07-19 19:52 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
lircd.patch (lircd.patch,853 bytes, patch)
2010-03-14 11:50 UTC, James Le Cuirot
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Le Cuirot gentoo-dev 2009-10-05 09:17:12 UTC
I have been running two instances of lircd like so.

/etc/conf.d/lircd.lr300:
LIRCD_OPTS="-H dev/input -d /dev/input/lr300 -l"

/etc/conf.d/lircd.rm900:
LIRCD_OPTS="-H livedrive_midi -d /dev/snd/rm900 -c localhost"
rc_need="lircd.lr300"

The first acts as a listening server for the second. Under the new setup, the second one fails because the /dev/lircd symlink already exists. I'm not sure but I don't think a socket file actually gets created when you connect to another server. I suggest that you don't try to remove the socket file or symlink and that you create the symlink with "ln -snf" which will recreate it without failing.
Comment 1 Dale Pontius 2010-03-02 18:18:58 UTC
Is there any status on this?
Does the original poster have a workaround?

I'm trying to run multiple instances of lirc.  I did this a year or so back with a previous version of lirc, and even with ugly hardcoding I've been unable to do so with the current version.

This looks like the clean way to do it, rather akin to the way net.* init scripts work.  Even with a few ugly hacks added, this would be cleaner what I was doing before.  If you've got something working, would you please share it.
Comment 2 James Le Cuirot gentoo-dev 2010-03-14 11:50:40 UTC
Created attachment 223515 [details, diff]
lircd.patch

Sorry for the delay in responding. I just made these quick adjustments.
Comment 3 Maxime de Roucy 2010-11-07 04:21:08 UTC
I think it should be better to move LIRCD_SYMLINKFILE and LIRCD_SOCKET from /etc/init.d/lircd to /etc/conf.d/lircd.

It works great for me.
I have :
* one file /etc/init.d/lircd without LIRCD_SYMLINKFILE or LIRCD_SOCKET variable.
* one symlink call /etc/init.d/lircd_0 pointing on /etc/init.d/lircd .
* one /etc/conf.d/lircd with :
     LIRCD_SYMLINKFILE=/dev/lircd
     LIRCD_SOCKET=/var/run/lirc/lircd
     LIRCD_OPTS="-H devinput -d /dev/input/by-id/blabla1 --connect=localhost"
* one /etc/conf.d/lircd_0 with :
     LIRCD_SYMLINKFILE=/dev/lircd0
     LIRCD_SOCKET=/var/run/lirc/lircd0
     LIRCD_OPTS="-H devinput -d /dev/input/by-id/blabla2 --output=$LIRCD_SOCKET --listen"
Comment 4 Ian Stakenvicius (RETIRED) gentoo-dev 2012-07-19 19:52:51 UTC
Fixed in lirc-0.9.0-r2 -- It probably should've been done this way to begin with.