From c0973e515e82c694822f44c252bd9308c48e8395 Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Mon, 30 Dec 2013 12:27:08 -0600
Subject: runit-scripts:  remotes, add more debugging and unload lirc_serial
 before load

refs #950
---
 abs/core/runit-scripts/PKGBUILD                    |  2 +-
 .../runitscripts/services/remotes/run              | 38 ++++++++++++++++++----
 2 files changed, 33 insertions(+), 7 deletions(-)

diff --git a/abs/core/runit-scripts/PKGBUILD b/abs/core/runit-scripts/PKGBUILD
index b1240ab..68ccd2f 100755
--- a/abs/core/runit-scripts/PKGBUILD
+++ b/abs/core/runit-scripts/PKGBUILD
@@ -1,6 +1,6 @@
 pkgname=runit-scripts
 pkgver=8.1
-pkgrel=6
+pkgrel=7
 pkgdesc="collection of startup scripts for runit"
 url="http://smarden.org/runit/"
 license="BSD"
diff --git a/abs/core/runit-scripts/runitscripts/services/remotes/run b/abs/core/runit-scripts/runitscripts/services/remotes/run
index 2363a3a..19c6375 100755
--- a/abs/core/runit-scripts/runitscripts/services/remotes/run
+++ b/abs/core/runit-scripts/runitscripts/services/remotes/run
@@ -72,13 +72,35 @@ else
                ;;
         esac
         
-        /usr/bin/setserial /dev/$serial_port uart none 2>&1 >> $LOG
-        sleep 0.5
-        echo "/sbin/modprobe lirc_serial $FLAGS" 2>&1 >> $LOG
-        /sbin/modprobe lirc_serial $FLAGS 2>&1 >> $LOG
-        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 -10 >> $LOG
+        dmesg | tail -20 >> $LOG
         echo "======= dmesg end ===========" >>$LOG
         
     fi
@@ -212,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
 
-- 
cgit v0.12

