summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/runit-scripts/runitscripts
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2009-04-06 02:30:29 (GMT)
committerJames Meyer <james.meyer@operamail.com>2009-04-06 02:30:29 (GMT)
commitbabd45727da96c550e8015aacf7c158d15a246dd (patch)
tree77ba40b842e86908352115ed81cc95d0ebc9ad7c /abs/core-testing/runit-scripts/runitscripts
parent8c44e2ea572a96c1634c360ce7f7e536f9883725 (diff)
downloadlinhes_pkgbuild-babd45727da96c550e8015aacf7c158d15a246dd.zip
linhes_pkgbuild-babd45727da96c550e8015aacf7c158d15a246dd.tar.gz
linhes_pkgbuild-babd45727da96c550e8015aacf7c158d15a246dd.tar.bz2
runit-scripts: add command ir support.
Total easy way out, but it's good enough for now. If the blaster is set for commandir, then it also will be the receiver. All other receivers are disabled, including LCD's that interact via lirc. Mostly this is because I didn't feel like chaining them together, and the commandir isn't picked up by the "normal" way of doing things because it doesn't create a /dev/lircX
Diffstat (limited to 'abs/core-testing/runit-scripts/runitscripts')
-rwxr-xr-xabs/core-testing/runit-scripts/runitscripts/services/lircd/run59
1 files changed, 32 insertions, 27 deletions
diff --git a/abs/core-testing/runit-scripts/runitscripts/services/lircd/run b/abs/core-testing/runit-scripts/runitscripts/services/lircd/run
index 1c5d8ff..373f04c 100755
--- a/abs/core-testing/runit-scripts/runitscripts/services/lircd/run
+++ b/abs/core-testing/runit-scripts/runitscripts/services/lircd/run
@@ -75,34 +75,39 @@ else
fi
dvico_detect
-
-
- LASTCMD=""
- for i in `seq 1 $num_lirc`
- do
- CMD="/usr/sbin/lircd -d /dev/lirc$i --output=/dev/lircd$i --pidfile=/var/run/lircd$i.pid --listen=876$i"
- echo $CMD
- $CMD >>$LOG 2>>$LOG
- LASTCMD="--connect=localhost:876$i $LASTCMD "
- done
- if [ $RunDvico = "true" -a $num_lirc -lt 0 ]
+ if [ x$HostBlasterType = xCommandIR -o x$HostBlasterType = xCommandIR ]
then
- #only run dvicio
- LCMD="/usr/sbin/lircd -n -d /dev/usb/hiddev0 --driver=dvico --output /dev/lircd"
-# echo $LCMD
- 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/hiddev0 --driver=dvico --output=/dev/lircd$i --pidfile=/var/run/lircd$i.pid --listen=876$i"
-# echo $CMD
- $CMD >> $LOG
- LASTCMD="--connect=localhost:876$i $LASTCMD "
- /usr/sbin/lircd -n -d /dev/lirc0 --output /dev/lircd $LASTCMD >>$LOG 2>>$LOG
+ rmmod commandir 2>/dev/null
+ CMD="/usr/sbin/lircd -n --driver=commandir"
+ $CMD >>$LOG 2>>$LOG
else
- LCMD="/usr/sbin/lircd -n -d /dev/lirc0 --output /dev/lircd $LASTCMD"
-# echo $LCMD
- exec $LCMD >>$LOG 2>>$LOG
+ LASTCMD=""
+ for i in `seq 1 $num_lirc`
+ do
+ CMD="/usr/sbin/lircd -d /dev/lirc$i --output=/dev/lircd$i --pidfile=/var/run/lircd$i.pid --listen=876$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 dvicio
+ LCMD="/usr/sbin/lircd -n -d /dev/usb/hiddev0 --driver=dvico --output /dev/lircd"
+ # echo $LCMD
+ 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/hiddev0 --driver=dvico --output=/dev/lircd$i --pidfile=/var/run/lircd$i.pid --listen=876$i"
+ # echo $CMD
+ $CMD >> $LOG
+ LASTCMD="--connect=localhost:876$i $LASTCMD "
+ /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"
+ # echo $LCMD
+ exec $LCMD >>$LOG 2>>$LOG
+ fi
fi
fi