summaryrefslogtreecommitdiffstats
path: root/abs/core/runit-scripts/runitscripts
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2014-01-07 18:11:16 (GMT)
committerBritney Fransen <brfransen@gmail.com>2014-01-07 18:11:16 (GMT)
commit4c2a2e3504f472628285a989c7c9a76be6855f54 (patch)
tree23bdd770c1257a373f7ef218fb1336fa890c512a /abs/core/runit-scripts/runitscripts
parentaf515b99f692bcf1f0af57aabe8f7c1a950b32c5 (diff)
parent402197f50ec8843de08d28a16eaefc15f3dee226 (diff)
downloadlinhes_pkgbuild-4c2a2e3504f472628285a989c7c9a76be6855f54.zip
linhes_pkgbuild-4c2a2e3504f472628285a989c7c9a76be6855f54.tar.gz
linhes_pkgbuild-4c2a2e3504f472628285a989c7c9a76be6855f54.tar.bz2
Merge branch 'testing'
Diffstat (limited to 'abs/core/runit-scripts/runitscripts')
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/remotes/run55
1 files changed, 46 insertions, 9 deletions
diff --git a/abs/core/runit-scripts/runitscripts/services/remotes/run b/abs/core/runit-scripts/runitscripts/services/remotes/run
index 4040d7e..19c6375 100755
--- a/abs/core/runit-scripts/runitscripts/services/remotes/run
+++ b/abs/core/runit-scripts/runitscripts/services/remotes/run
@@ -14,6 +14,10 @@ fi
echo "`date` --- run started" >> $LOG
+echo "====== lirc modules already loaded ==========" >> $LOG
+lsmod |grep lirc >> $LOG
+echo "====== lirc modules end =========" >> $LOG
+echo >> $LOG
#What is done in this file may not be enough to start your specific remote.
#If that is true of your remote place your remote startup commands in:
# /etc/runit/lirc.sh
@@ -47,29 +51,58 @@ else
if [ -n "$serial_port" ]
then
+ echo "Serial device setup: $serial_port" >>$LOG
#/dev/ttyS0 (COM1), port 0x3f8, irq 4
#/dev/ttyS1 (COM2), port 0x2f8, irq 3
#/dev/ttyS2 (COM3), port 0x3e8, irq 4
#/dev/ttyS3 (COM4), port 0x2e8, irq 3
-
+ printhl " Using serial device, loading module lirc_serial"
case $serial_port in
ttyS0)
- FLAGS="io=0x3f8 irq=4"
+ FLAGS="io=0x3f8 irq=4 debug=1 "
;;
ttyS1)
- FLAGS="io=0x2f8 irq=3"
+ FLAGS="io=0x2f8 irq=3 debug=1"
;;
ttyS2)
- FLAGS="io=0x3e8 irq=4"
+ FLAGS="io=0x3e8 irq=4 debug=1"
;;
ttyS3)
- FLAGS="io=0x2e8 irq=3"
+ FLAGS="io=0x2e8 irq=3 debug=1"
;;
esac
- /usr/bin/setserial /dev/$serial_port uart none
- sleep 0.5
- /sbin/modprobe lirc_serial $FLAGS
- sleep 0.5
+
+ #set_serial debugging
+ /usr/bin/setserial -va /dev/$serial_port 2>&1 >> $LOG
+ echo '' 2>&1 >> $LOG
+
+ #run set_serial command
+ /usr/bin/setserial -v /dev/$serial_port uart none 2>&1 >> $LOG
+ echo '' 2>&1 >> $LOG
+
+ #set_serial debugging
+ /usr/bin/setserial -va /dev/$serial_port 2>&1 >> $LOG
+ sleep 1
+
+ #remove lirc_serial
+ echo "*Removing lirc_serial" 2>&1 >> $LOG
+ /usr/bin/rmmod -v lirc_serial 2>> $LOG
+ /usr/bin/rmmod -v lirc_dev 2>> $LOG
+
+ echo "*Loading lirc_serial" 2>&1 >> $LOG
+ echo "/sbin/modprobe lirc_serial $FLAGS" 2>&1 >> $LOG
+ /sbin/modprobe -v lirc_serial $FLAGS 2>&1 >> $LOG
+
+ echo "====== lirc modules after load ==========" >> $LOG
+ lsmod |grep lirc >> $LOG
+ echo "====== lirc modules end =========" >> $LOG
+
+ sleep 1
+
+ echo "====== dmesg output ============" >>$LOG
+ dmesg | tail -20 >> $LOG
+ echo "======= dmesg end ===========" >>$LOG
+
fi
if [ x$HostBlasterType = xCommandIR -o x$ReceiverType = xCommandIR ]
@@ -201,6 +234,10 @@ else
echo $LASTCMD >>$LOG
echo "Disable in kernel remote driver" >>$LOG
in_kernel_support "disable"
+
+
+
+
echo "Starting remotes from $LCMD" >>$LOG
exec $LCMD >>$LOG 2>>$LOG