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.
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.
Created attachment 223515 [details, diff] lircd.patch Sorry for the delay in responding. I just made these quick adjustments.
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"
Fixed in lirc-0.9.0-r2 -- It probably should've been done this way to begin with.