diff options
author | James Meyer <james.meyer@operamail.com> | 2009-04-10 16:44:42 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2009-04-10 16:44:42 (GMT) |
commit | 5e80643fcd0df6419f18bccba6594a251eb2d179 (patch) | |
tree | 02eba330ea85211042a4fa4fcb0c9147c77d3e8a /abs/core-testing/runit-scripts/runitscripts/services/lircd | |
parent | 6a486a28262c43e8ae2c1a742b4ffd4b29eaf0d0 (diff) | |
download | linhes_pkgbuild-5e80643fcd0df6419f18bccba6594a251eb2d179.zip linhes_pkgbuild-5e80643fcd0df6419f18bccba6594a251eb2d179.tar.gz linhes_pkgbuild-5e80643fcd0df6419f18bccba6594a251eb2d179.tar.bz2 |
runit-scripts: added fbsplash-runit.sh and general cleanup to make text pretty
Diffstat (limited to 'abs/core-testing/runit-scripts/runitscripts/services/lircd')
-rwxr-xr-x | abs/core-testing/runit-scripts/runitscripts/services/lircd/finish | 6 | ||||
-rwxr-xr-x | abs/core-testing/runit-scripts/runitscripts/services/lircd/run | 28 |
2 files changed, 27 insertions, 7 deletions
diff --git a/abs/core-testing/runit-scripts/runitscripts/services/lircd/finish b/abs/core-testing/runit-scripts/runitscripts/services/lircd/finish index 754bca1..1afc41c 100755 --- a/abs/core-testing/runit-scripts/runitscripts/services/lircd/finish +++ b/abs/core-testing/runit-scripts/runitscripts/services/lircd/finish @@ -1,4 +1,8 @@ #!/bin/bash +export TERM=linux +. /etc/rc.conf +. /etc/rc.d/functions + killall -9 lircd 2>/dev/null rm -f /var/run/lirc*.pid [ -e /etc/sv/lircd/.runtime ] || mkdir -p /etc/sv/lircd/.runtime @@ -8,5 +12,5 @@ if [ $numfiles -gt 3 ] then rm -f /etc/sv/lircd/.runtime/* 2>/dev/null sv stop lircd - echo "lircd is not able to start, disabling it" + printhl " lircd is not able to start, disabling it" fi diff --git a/abs/core-testing/runit-scripts/runitscripts/services/lircd/run b/abs/core-testing/runit-scripts/runitscripts/services/lircd/run index 373f04c..914f5cf 100755 --- a/abs/core-testing/runit-scripts/runitscripts/services/lircd/run +++ b/abs/core-testing/runit-scripts/runitscripts/services/lircd/run @@ -1,5 +1,9 @@ #!/bin/bash exec 2>&1 +export TERM=linux +. /etc/rc.conf +. /etc/rc.d/functions + #since what we do may not be enough #if your one of those people, this is where you place your stuff LOG=/tmp/lirc.log @@ -10,9 +14,13 @@ fi if [ -f /etc/runit/lirc.sh ] then #program must not terminate. + + stat_runit "Starting lirc" + /etc/runit/lirc.sh else . /etc/systemconfig + stat_runit "Starting lirc" [ -e /etc/sv/lircd/.runtime ] || mkdir -p /etc/sv/lircd/.runtime function dvico_detect { @@ -24,7 +32,7 @@ else fi } - num_lirc=`ls -la /dev/lirc[0-9] |wc -l` + num_lirc=`ls -la /dev/lirc[0-9] 2>/dev/null |wc -l ` num_lirc=$((num_lirc-1)) #/dev/ttys0 (COM1), port 0x3f8, irq 4 @@ -79,22 +87,27 @@ else then rmmod commandir 2>/dev/null CMD="/usr/sbin/lircd -n --driver=commandir" + printhl " Using commandir" + $CMD >>$LOG 2>>$LOG else 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 +# echo $CMD + printhl " Device $i" $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 + #only run dvicio + LCMD="/usr/sbin/lircd -n -d /dev/usb/hiddev0 --driver=dvico --output /dev/lircd" + # echo $LCMD + printhl " Device Dvicio" + + exec $LCMD >>$LOG 2>>$LOG elif [ $RunDvico = true -a $num_lirc -gt -1 ] then #chain them together @@ -103,10 +116,13 @@ else # echo $CMD $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" # echo $LCMD + exec $LCMD >>$LOG 2>>$LOG fi fi |