summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-system/load-modules-mythvantage.sh
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/LinHES-system/load-modules-mythvantage.sh')
-rwxr-xr-xabs/core/LinHES-system/load-modules-mythvantage.sh64
1 files changed, 64 insertions, 0 deletions
diff --git a/abs/core/LinHES-system/load-modules-mythvantage.sh b/abs/core/LinHES-system/load-modules-mythvantage.sh
new file mode 100755
index 0000000..06c8a96
--- /dev/null
+++ b/abs/core/LinHES-system/load-modules-mythvantage.sh
@@ -0,0 +1,64 @@
+#!/bin/bash
+#/usr/bin/load-modules-mythvantage.sh UNLOAD LCD
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/systemconfig
+case $1 in
+UNLOAD|unload )
+ MODULELIST=`grep /etc/modules.mythvantage $2`
+ for i in $MODULELIST
+ do
+ /sbin/rmmod $i
+ done
+
+ ;;
+
+ *) printhl " Loading MythVantage-modules"
+ #try to load the cx88 modules
+ if [ ! x$SystemType = xFrontend_only ]
+ then
+ /sbin/modprobe cx88-dvb 2>/dev/null
+ fi
+
+ if [ -f /etc/modules.mythvantage ]
+ then
+ while read line
+ do
+ module=`echo $line |cut -d# -f1`
+ #this doesn't do anything on boot cause ttySX does not yet exisit
+ if [ x$module = xlirc_serial ]
+ then
+ if [ x$ReceiverType = xSerial ]
+ then
+ case $ReceiverSerialport in
+ ttyS0) FLAGS="io=0x3f8 irq=4";;
+ ttyS1) FLAGS="io=0x2f8 irq=3" ;;
+ ttyS2) FLAGS="io=0x3e8 irq=4" ;;
+ ttyS3) FLAGS="io=0x2f8 irq=3" ;;
+ esac
+ /usr/bin/setserial /dev/$ReceiverSerialport uart none 2>/dev/null
+ if [ $? = 0 ]
+ then
+ /sbin/modprobe lirc_serial $FLAGS 2>/dev/nulla
+ fi
+ elif [ x$HostBlasterType = xSerial ]
+ then
+ case $HostSerialPort_blasterlirc in
+ ttyS0) FLAGS="io=0x3f8 irq=4";;
+ ttyS1) FLAGS="io=0x2f8 irq=3" ;;
+ ttyS2) FLAGS="io=0x3e8 irq=4" ;;
+ ttyS3) FLAGS="io=0x2f8 irq=3" ;;
+ esac
+ /usr/bin/setserial /dev/$HostSerialPort_blasterlirc uart none 2>/dev/null
+ if [ $? = 0 ]
+ then
+ /sbin/modprobe lirc_serial $FLAGS 2>/dev/nulla
+ fi
+ fi
+ fi
+ /sbin/modprobe $module 2> /dev/null
+ done < /etc/modules.mythvantage
+ fi
+esac
+