|
From: Jay J. <cu...@ch...> - 2009-01-19 21:00:32
|
Ah: The other part: how to control their load order. For that, you would need to work on a file in /etc/modprobe.d which sensed an attempt to load either one, and then forced the load order, I suspect. (That isn't a problem that I had because lirc_serial never loaded by default -- I used the load of lirc_ivtv to force lirc_serial to load as well). JRJ At 02:46 PM 1/19/2009 -0600, Jay Jaeger wrote: >You can set things up so that both run at the same time. You need to run >two instance of lircd, one for each. > >I "hacked" a copy of /etc/init.d/lirc to make a second one, >/etc/init.d/lirc2, and pointed it at a second /etc/syconfig file, thusly. > >First, here is /etc/sysconfig/lirc2 (my second device is a serial blaster) > >[root@mythsoby1 sysconfig]# cat lirc2 ># Note: in addition to these parameters, you need to have working -*- >sh -*- ># configuration file for lircd (and lircmd if enabled). > ># Options to lircd(8). Typically, this will be empty, as which driver to use ># should be specified using the LIRC_DRIVER variable below. >LIRCD_OPTIONS="--output=/dev/lircd1" >LIRC_PIDFILE="/var/run/lircd2.pid" > ># The infrared receiver (and/or transmitter) driver to be used by lircd(8), ># similar to passing "-H driver" to lircd(8). ># Run "/usr/sbin/lircd -H help" to get a listing of supported drivers. >LIRC_DRIVER="default" > ># Which lirc device will be used by lircd(8). ># This is the same as passing "-d device" to lircd. ># An empty value will use the default /dev/lirc device. >LIRC_DEVICE="/dev/lirc1" > ># If "yes", the init script will try to start lircmd(8) too. >ENABLE_LIRCMD="no" > ># Options to lircmd(8). >LIRCMD_OPTIONS="" > > >And here are the differences between /etc/init.d/lirc and /etc/init.d/lirc2 >(my hacked copy). The differences are mostly "obvious" except for the fact >that you want the second instance to ignore lircmd . > >[root@mythsoby1 init.d]# diff lirc lirc2 >4a5,6 > > # SECOND INSTANCE - made as a copy of the first. > > # >11c13 >< # pidfile: /var/run/lircd.pid >--- > > # pidfile: /var/run/lircd2.pid >14c16 >< # Provides: lirc >--- > > # Provides: lirc2 >29c31 >< [ -e /etc/sysconfig/lirc ] && . /etc/sysconfig/lirc >--- > > [ -e /etc/sysconfig/lirc2 ] && . /etc/sysconfig/lirc2 >31c33 >< lockfile=/var/lock/subsys/lirc >--- > > lockfile=/var/lock/subsys/lirc2 >51c53,54 >< if [ ! -z "$LIRC_DEVICE" ] || [ ! -z "$LIRC_DRIVER" ]; then >--- > > > > if [ ! -z "$LIRC_DEVICE" ] || [ ! -z "$LIRC_DRIVER" ] ; then >57a61 > >(Note, the above difference is a blank line -- not real) > > > >58a63,71 > > > > # > > # Ditto for LIRC_PIDFILE > > # > > > > if [ ! -z "$LIRC_PIDFILE" ] ; then > > LIRC_ARGS="$LIRC_ARGS --pidfile=$LIRC_PIDFILE" > > fi > > >65,66c78,84 >< echo -n $"Starting infrared remote control daemon ($prog): " >< daemon $exec $LIRC_ARGS $LIRCD_OPTIONS >--- > > echo -n $"Starting infrared remote control daemon ($prog) #2: " > > > > # > > # daemon doesn't work here unless we use --force, > > # because the program name matches the first instance. > > # > > daemon --force $exec $LIRC_ARGS $LIRCD_OPTIONS >82,87c100,105 >< if status $prog2 >/dev/null 2>&1 ; then >< echo -n $"Stopping infrared remote control mouse daemon ($prog2): " >< killproc $prog2 >< retval=$? >< echo >< fi >--- > > # if status $prog2 >/dev/null 2>&1 ; then > > # echo -n $"Stopping infrared remote control mouse daemon > ($prog2): " > > # killproc $prog2 > > # retval=$? > > # echo > > # fi >89,90c107,108 >< echo -n $"Stopping infrared remote control daemon ($prog): " >< killproc $prog >--- > > echo -n $"Stopping infrared remote control daemon ($prog) #2: " > > killproc -p $LIRC_PIDFILE $prog > >JRJ > > >At 02:02 PM 1/19/2009 -0600, Mark Jenks wrote: > >On Mon, Jan 19, 2009 at 11:17 AM, Christoph Bartelmus <li...@ba...> > >wrote: > > > Hi! > > > > > > Mark Jenks "mje...@gm..." wrote: > > >> I currently have 2 lirc devices installed in my Fedora 10 server. > > >> > > >> The problem that I am having, is that they keep flipping back and > > >> forth, and I have to constantly change my /etc/sysconfig/lirc to point > > >> to the correct device. > > > [...] > > >> Is that the perferred way to do this? Is there a better way? > > > > > > You should write what kind of devices you have and why they are flipping > > > back and forth. > > > > > > Christoph > > > > > > >I have a lirc_mceusb2 and a lirc_imon both in the same computer. > > > >When I reboot, they flip between lirc0 and lirc1. I really am going > >to be using one to start out with, and could blacklist the other. > >But I want to understand what is the real way to deal with this. > > > >-Mark > > > >------------------------------------------------------------------------- > ----- > >This SF.net email is sponsored by: > >SourcForge Community > >SourceForge wants to tell your story. > >http://p.sf.net/sfu/sf-spreadtheword > > >------------------------------------------------------------------------------ >This SF.net email is sponsored by: >SourcForge Community >SourceForge wants to tell your story. >http://p.sf.net/sfu/sf-spreadtheword |