diff options
author | Greg Frost <gregfrost1@bigpond.com> | 2009-07-19 05:04:33 (GMT) |
---|---|---|
committer | Greg Frost <gregfrost1@bigpond.com> | 2009-07-19 05:04:33 (GMT) |
commit | 1a13bb8bdc2d9f727201113e234eecfd868eda03 (patch) | |
tree | 16e8e4cf4ea44488190f5bfb58aa4e143c2d3bac /abs/core-testing/runit-scripts/runitscripts/services/lircd | |
parent | a8497f7436ef800137be60cf37a6907ba06b928e (diff) | |
download | linhes_pkgbuild-1a13bb8bdc2d9f727201113e234eecfd868eda03.zip linhes_pkgbuild-1a13bb8bdc2d9f727201113e234eecfd868eda03.tar.gz linhes_pkgbuild-1a13bb8bdc2d9f727201113e234eecfd868eda03.tar.bz2 |
runit-scripts: unbork and add Dvico dual4 rev2 support
Diffstat (limited to 'abs/core-testing/runit-scripts/runitscripts/services/lircd')
-rwxr-xr-x | abs/core-testing/runit-scripts/runitscripts/services/lircd/run | 56 |
1 files changed, 34 insertions, 22 deletions
diff --git a/abs/core-testing/runit-scripts/runitscripts/services/lircd/run b/abs/core-testing/runit-scripts/runitscripts/services/lircd/run index 3473fa6..7067b90 100755 --- a/abs/core-testing/runit-scripts/runitscripts/services/lircd/run +++ b/abs/core-testing/runit-scripts/runitscripts/services/lircd/run @@ -30,7 +30,7 @@ else [ -e /etc/sv/lircd/.runtime ] || mkdir -p /etc/sv/lircd/.runtime function dvico_detect { - if [ x$Remotetype = "xdvico" ] + if [ x$Remotetype = "xdvico" ] || [ x$Remotetype = "xDvico-Dual-Digital4-rev2" ] then RunDvico=true else @@ -46,7 +46,7 @@ else if [ x$ReceiverType = xSerial ] then serial_port=$ReceiverSerialport - elid [ x$HostBlasterType = xSerial ] + elif [ x$HostBlasterType = xSerial ] then serial_port=$HostSerialPort_blasterlirc fi @@ -85,11 +85,13 @@ else CMD="/usr/sbin/lircd -n --driver=commandir" printhl " Using commandir" $CMD >>$LOG 2>>$LOG +echo $CMD elif [ x$HostBlasterType = xiguanaIR-usb -o x$ReceiverType = xiguanaIR-usb ] then sv start igdaemon CMD="/usr/sbin/lircd -n --driver=iguanaIR" printhl " Using iguanaIR usb" +echo $CMD $CMD >>$LOG 2>>$LOG else LASTCMD="" @@ -98,29 +100,39 @@ else do CMD="/usr/sbin/lircd -d /dev/lirc$i --output=/dev/lircd$i --pidfile=/var/run/lircd$i.pid --listen=876$i" printhl " Device $i" +echo $CMD $CMD >>$LOG 2>>$LOG LASTCMD="--connect=localhost:876$i $LASTCMD " done - if [ $RunDvico = "true" -a $num_lirc -lt 0 ] - then - #only run Dvico - LCMD="/usr/sbin/lircd -n -d /dev/usb/dvicoIR --driver=dvico --output /dev/lircd" - printhl " Device Dvicio" - exec $LCMD >>$LOG 2>>$LOG - elif [ $RunDvico = true -a $num_lirc -gt -1 ] - then - # Chain them together. - i=$((i+1)) - CMD="/usr/sbin/lircd -d /dev/usb/dvicoIR --driver=dvico --output=/dev/lircd$i --pidfile=/var/run/lircd$i.pid --listen=876$i" - $CMD >> $LOG - LASTCMD="--connect=localhost:876$i $LASTCMD " - printhl " Device Dvicio" - - /usr/sbin/lircd -n -d /dev/lirc0 --output /dev/lircd $LASTCMD >>$LOG 2>>$LOG - else - LCMD="/usr/sbin/lircd -n -d /dev/lirc0 --output /dev/lircd $LASTCMD" - exec $LCMD >>$LOG 2>>$LOG - fi + if [ $RunDvico = "true" ] + then + if [ x$Remotetype = "xdvico" ] + then + LCMD="/usr/sbin/lircd -n -d /dev/usb/dvicoIR --driver=dvico --output /dev/lircd" + else + LCMD="/usr/sbin/lircd -n -d /dev/input/irremote --driver=devinput --output /dev/lircd" + fi + + if [ $num_lirc -lt 0 ] + then + # Only run Dvico + printhl " Device $Remotetype" +echo $LCMD + exec $LCMD >>$LOG 2>>$LOG + elif [ $num_lirc -gt -1 ] + then + i=$((i+1)) + CMD="$LCMD --output=/dev/lircd$i --pidfile=/var/run/lircd$i.pid --listen=876$i" + $CMD >> $LOG + LASTCMD="--connect=localhost:876$i $LASTCMD " + printhl " Device Dvico" + /usr/sbin/lircd -n -d /dev/lirc0 --output /dev/lircd $LASTCMD >>$LOG 2>>$LOG + fi + else + LCMD="/usr/sbin/lircd -n -d /dev/lirc0 --output /dev/lircd $LASTCMD" +echo $LCMD + exec $LCMD >>$LOG 2>>$LOG + fi fi fi |