summaryrefslogtreecommitdiffstats
path: root/abs/mv-core
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2008-12-07 00:39:49 (GMT)
committerJames Meyer <james.meyer@operamail.com>2008-12-07 00:39:49 (GMT)
commit2ce20c77e0e643b5d60ef0dff4d689bb5a05f656 (patch)
treed74629d6ec777b9205bd19ac100bcf3df3255dec /abs/mv-core
parent3211a5b7d8ddb4c7871f844036c366108ee57ef3 (diff)
downloadlinhes_pkgbuild-2ce20c77e0e643b5d60ef0dff4d689bb5a05f656.zip
linhes_pkgbuild-2ce20c77e0e643b5d60ef0dff4d689bb5a05f656.tar.gz
linhes_pkgbuild-2ce20c77e0e643b5d60ef0dff4d689bb5a05f656.tar.bz2
Add support for Autodetection of Hauppauge pvr-250 receivers. This should work
but I don't have a pvr-250 receiver anymore so can't fully test it. If PVR-250 is found then the old Hauppauge remote is assumed to be in use. Detection first checks for USB receivers, if no receiver is found it then checks for Hauppauge receivers. First found remote wins, so if a USB receiver is found the Hauppauge detection is never run. Oddly enough I never wanted to use a Hauppauage receiver again, but somehow I spent most of the adding support for it.
Diffstat (limited to 'abs/mv-core')
-rwxr-xr-xabs/mv-core/MythVantage-config/install_functions.sh23
-rwxr-xr-xabs/mv-core/MythVantage-config/systemconfig.sh1318
-rw-r--r--abs/mv-core/MythVantage-config/templates/modules/lirc_i2c.conf2
-rw-r--r--abs/mv-core/MythVantage-config/templates/remotes/i2c.id5
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/lircd/run6
5 files changed, 697 insertions, 657 deletions
diff --git a/abs/mv-core/MythVantage-config/install_functions.sh b/abs/mv-core/MythVantage-config/install_functions.sh
index 84f9c94..1d217e9 100755
--- a/abs/mv-core/MythVantage-config/install_functions.sh
+++ b/abs/mv-core/MythVantage-config/install_functions.sh
@@ -49,9 +49,31 @@ function setupremote {
/usr/sbin/lircd -d /dev/lirc0
mkdir /root/.mythtv
ln -s /etc/lircrc /root/.mythtv/lircrc
+ else
+ echo "Couldn't open directory $TEMPLATES/remotes/$Remotetype"
fi
}
+function scan_for_hpg_receiver() {
+echo "Scanning for Hauppauge receiver"
+for hpgid in `lspci -nm -d4444: |cut -d" " -f6- |tr -d '"'|tr " " :`
+do
+ line=`grep $hpgid $TEMPLATES/remotes/i2c.id`
+ if [ $? = 0 ]
+ then
+ modprobe lirc_i2c
+ FoundReceiverType=`echo "$line"|cut -d"|" -f2`
+ Remotetype=`echo "$line"|cut -d"|" -f4`
+ statusline=`echo "$line"|cut -d"|" -f2,4`
+ echo "Found $statusline , $Remotetype"
+ update_db_settings HostReceiverType $FoundReceiverType
+ setupremote
+ break
+ fi
+
+done
+}
+
function scan_for_usb_remote () {
echo "Scanning for usb receiver/remote"
while read line
@@ -67,6 +89,7 @@ do
break
fi
done <$BASE/$TEMPLATES/remotes/receiver_usb.id
+scan_for_hpg_receiver
}
function rest_of_network () {
diff --git a/abs/mv-core/MythVantage-config/systemconfig.sh b/abs/mv-core/MythVantage-config/systemconfig.sh
index 3fbf9b1..4885f5a 100755
--- a/abs/mv-core/MythVantage-config/systemconfig.sh
+++ b/abs/mv-core/MythVantage-config/systemconfig.sh
@@ -21,23 +21,23 @@ postfix=`cat ${BASE}/usr/local/share/mythtv/.releasetype`
PKGBLACKLIST=$BASE/etc/blacklist.package
if [ x$1 = x"Mysql_only" ]
- then
- rm -f /tmp/mysql.txt
- sed -e "s/^DBHostName=.*$/DBHostName=$2/" $TEMPLATES/mysql.txt > /tmp/mysql.txt
- exit 0
- fi
+then
+ rm -f /tmp/mysql.txt
+ sed -e "s/^DBHostName=.*$/DBHostName=$2/" $TEMPLATES/mysql.txt > /tmp/mysql.txt
+ exit 0
+fi
if [ -f /etc/systemconfig ]
then
- . /etc/systemconfig
-setup_MYTH_vars
-TEMPNET="Hostip"$default_interface
-echo $TEMPNET
-eval MYTHIP=\$${TEMPNET}
+ . /etc/systemconfig
+ setup_MYTH_vars
+ TEMPNET="Hostip"$default_interface
+ echo $TEMPNET
+ eval MYTHIP=\$${TEMPNET}
else
- echo "could not find /etc/systemconfig"
- exit 1
+ echo "could not find /etc/systemconfig"
+ exit 1
fi
@@ -47,60 +47,60 @@ fi
function setupmysql {
#setup mysql.txt to find the database servers
- if [ $SystemType = "Master_backend" ]
- then
- if [ $MYTHDHCP = 0 ]
- then
- #this grabs eth0, as that is all thats supported.
-# dbhost=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'|head -n1`
- dbhost=`ifconfig | grep -C1 $default_interface| grep -v $default_interface | cut -d: -f2 | awk '{ print $1}'`
- sed -e "s/^dbhost=.*$/dbhost=\"$dbhost\"/" /etc/systemconfig >/tmp/systemconfig.old
- cp /tmp/systemconfig.old ${BASE}/etc/systemconfig
- ##logic to change master_serverip and backend_serverip in db
- ${BASE}${MV_ROOT}/bin/restore_default_settings.sh -c BECONFIG -s master -a $dbhost
- else
+if [ $SystemType = "Master_backend" ]
+then
+ if [ $MYTHDHCP = 0 ]
+ then
+ #this grabs eth0, as that is all thats supported.
+ # dbhost=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'|head -n1`
+ dbhost=`ifconfig | grep -C1 $default_interface| grep -v $default_interface | cut -d: -f2 | awk '{ print $1}'`
+ sed -e "s/^dbhost=.*$/dbhost=\"$dbhost\"/" /etc/systemconfig >/tmp/systemconfig.old
+ cp /tmp/systemconfig.old ${BASE}/etc/systemconfig
+ ##logic to change master_serverip and backend_serverip in db
+ ${BASE}${MV_ROOT}/bin/restore_default_settings.sh -c BECONFIG -s master -a $dbhost
+ else
- dbhost=$MYTHIP
- sed -e "s/^dbhost=.*$/dbhost=\"$dbhost\"/" /etc/systemconfig >/tmp/systemconfig.old
- cp /tmp/systemconfig.old ${BASE}/etc/systemconfig
- #logic to change dbhost in db
- ${BASE}${MV_ROOT}/bin/restore_default_settings.sh -c BECONFIG -s master -a $dbhost
- fi
- fi
+ dbhost=$MYTHIP
+ sed -e "s/^dbhost=.*$/dbhost=\"$dbhost\"/" /etc/systemconfig >/tmp/systemconfig.old
+ cp /tmp/systemconfig.old ${BASE}/etc/systemconfig
+ #logic to change dbhost in db
+ ${BASE}${MV_ROOT}/bin/restore_default_settings.sh -c BECONFIG -s master -a $dbhost
+ fi
+fi
- if [ $SystemType = "Slave_backend" ]
- then
- if [ $MYTHDHCP = 0 ]
- then
- #this grabs eth0, as that is all thats supported.
- #slavehost=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'|head -n1`
- slavehost=`ifconfig | grep -C1 $default_interface| grep -v $default_interface | cut -d: -f2 | awk '{ print $1}'`
- ##logic to change backend_serverip in db
- ${BASE}${MV_ROOT}/bin/restore_default_settings.sh -c BECONFIG -s slave -a $slavehost
- else
- slavehost=$MYTHIP
+if [ $SystemType = "Slave_backend" ]
+then
+ if [ $MYTHDHCP = 0 ]
+ then
+ #this grabs eth0, as that is all thats supported.
+ #slavehost=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'|head -n1`
+ slavehost=`ifconfig | grep -C1 $default_interface| grep -v $default_interface | cut -d: -f2 | awk '{ print $1}'`
+ ##logic to change backend_serverip in db
+ ${BASE}${MV_ROOT}/bin/restore_default_settings.sh -c BECONFIG -s slave -a $slavehost
+ else
+ slavehost=$MYTHIP
- #logic to change backend_serverif in db
- ${BASE}${MV_ROOT}/bin/restore_default_settings.sh -c BECONFIG -s slave -a $slavehost
- fi
- fi
+ #logic to change backend_serverif in db
+ ${BASE}${MV_ROOT}/bin/restore_default_settings.sh -c BECONFIG -s slave -a $slavehost
+ fi
+fi
- MYSQLTXT=${BASE}/usr/local/share/mythtv/mysql.txt
- if [ $SystemType = "Standalone" ]
- then
- sed -e "s/^DBHostName=.*$/DBHostName="localhost"/" $TEMPLATES/mysql.txt > $MYSQLTXT
- else
- sed -e "s/^DBHostName=.*$/DBHostName=$dbhost/" $TEMPLATES/mysql.txt > $MYSQLTXT
- fi
- rm ${BASE}/data/home/mythtv/.mythtv/mysql.txt
- rm ${BASE}${MV_ROOT}/bin/mythtv/.mythtv/mysql.txt
- if [ -f ${BASE}/data/home/mythtv/templates/mysql.txt ]
- then
- cp ${BASE}/data/home/mythtv/templates/mysql.txt $MYSQLTXT
- fi
+MYSQLTXT=${BASE}/usr/local/share/mythtv/mysql.txt
+if [ $SystemType = "Standalone" ]
+then
+ sed -e "s/^DBHostName=.*$/DBHostName="localhost"/" $TEMPLATES/mysql.txt > $MYSQLTXT
+else
+ sed -e "s/^DBHostName=.*$/DBHostName=$dbhost/" $TEMPLATES/mysql.txt > $MYSQLTXT
+fi
+rm ${BASE}/data/home/mythtv/.mythtv/mysql.txt
+rm ${BASE}${MV_ROOT}/bin/mythtv/.mythtv/mysql.txt
+if [ -f ${BASE}/data/home/mythtv/templates/mysql.txt ]
+then
+ cp ${BASE}/data/home/mythtv/templates/mysql.txt $MYSQLTXT
+fi
- chmod 755 $MYSQLTXT
- chown mythtv $MYSQLTXT
+chmod 755 $MYSQLTXT
+chown mythtv $MYSQLTXT
}
@@ -111,28 +111,28 @@ status=$?
- if [ $SystemType = "Standalone" ]
- then
- sed -ie "s/^#skip-networking/skip-networking/g" $BASE/$MFILE
- if [ $status = 0 ]
- then
- sudo sv restart mysql
- echo "restarting mysql with no network"
- fi
+if [ $SystemType = "Standalone" ]
+then
+ sed -ie "s/^#skip-networking/skip-networking/g" $BASE/$MFILE
+ if [ $status = 0 ]
+ then
+ sudo sv restart mysql
+ echo "restarting mysql with no network"
+ fi
- fi
+fi
- if [ $SystemType = "Master_backend" ]
+if [ $SystemType = "Master_backend" ]
+then
+ sed -ie "s/^skip-networking/#skip-networking/g" $BASE/$MFILE
+ if [ $status = 1 ]
then
- sed -ie "s/^skip-networking/#skip-networking/g" $BASE/$MFILE
- if [ $status = 1 ]
- then
- sudo sv restart mysql
- echo "restarting mysql with network"
- fi
-
+ sudo sv restart mysql
+ echo "restarting mysql with network"
fi
+fi
+
}
@@ -146,102 +146,110 @@ fi
rm ${BASE}/etc/localtime
echo $timezone
ln -s "/usr/share/zoneinfo/$timezone" ${BASE}/etc/localtime
- sed -e "s~^TIMEZONE=.*$~TIMEZONE=\"${timezone}\"~" ${BASE}/etc/rc.conf > $TEMPLATES/rc.conf
+sed -e "s~^TIMEZONE=.*$~TIMEZONE=\"${timezone}\"~" ${BASE}/etc/rc.conf > $TEMPLATES/rc.conf
- # echo CLOCK="UTC" > ${BASE}/etc/conf.dclock
- # echo CLOCK_SYSTOCH="yes" >> ${BASE}/etc/conf.d/clock
- # echo TIMEZONE="$timezone" >> ${BASE}/etc/conf.d/clock
+# echo CLOCK="UTC" > ${BASE}/etc/conf.dclock
+# echo CLOCK_SYSTOCH="yes" >> ${BASE}/etc/conf.d/clock
+# echo TIMEZONE="$timezone" >> ${BASE}/etc/conf.d/clock
cp $TEMPLATES/rc.conf /etc/rc.conf
}
function setupreceiver {
- case $ReceiverType in
+case $ReceiverType in
tinker) echo "do nothing"
- ;;
+ ;;
Serial) echo "setup serial lirc"
- sed -i -e '/.*#lirc/d' ${BASE}/etc/modules.mythvantage
- echo "lirc_serial #lirc" >> ${BASE}/etc/modules.mythvantage
- /usr/bin/load-modules-mythvantage.sh
- ;;
+ sed -i -e '/.*#lirc/d' ${BASE}/etc/modules.mythvantage
+ echo "lirc_serial #lirc" >> ${BASE}/etc/modules.mythvantage
+ /usr/bin/load-modules-mythvantage.sh
+ ;;
Usb-imon) echo "setup receiver-usb-imon"
- sed -i -e '/.*#lirc/d' ${BASE}/etc/modules.mythvantage
- echo "lirc_imon #lirc" >> ${BASE}/etc/modules.mythvantage
- /usr/bin/load-modules-mythvantage.sh
- ;;
- *) sed -i -e '/.*#lirc/d' ${BASE}/etc/modules.mythvantage
- ;;
- esac
+ sed -i -e '/.*#lirc/d' ${BASE}/etc/modules.mythvantage
+ echo "lirc_imon #lirc" >> ${BASE}/etc/modules.mythvantage
+ /usr/bin/load-modules-mythvantage.sh
+ ;;
+ Hauppauge) echo "setup hauppauge reciever (lirc_i2c)"
+ sed -i -e '/.*#lirc/d' ${BASE}/etc/modules.mythvantage
+ echo "lirc_i2c #lirc" >> ${BASE}/etc/modules.mythvantage
+ cp $TEMPLATES/modules/lirc_i2c.conf ${BASE}/etc/modprobe.d/lirc_i2c.conf
+ rmmod lirc_i2c 2>/dev/null
+ load-modules-mythvantage.sh
+ ;;
+
+ *) sed -i -e '/.*#lirc/d' ${BASE}/etc/modules.mythvantage
+ ;;
+esac
}
function setupremote {
- case $Remotetype in
- no_remote) echo "No remote selected"
- daemon_remove="lircd $daemon_remove"
- ;;
- tinker) echo "Remote in tinker mode"
- ;;
- *) echo "Setup remote"
- mv ${BASE}/etc/lircd.conf ${BASE}/etc/lircd.conf.`date +%Y-%m-%d-%H-%M`
- cd $TEMPLATES/remotes/$Remotetype
- for i in lircd*
- do
- cat $i >> ${BASE}/etc/lircd.conf
- done
- cp lircrc ${BASE}/etc/lircrc
- if [ -f $TEMPLATES/LCD/$LCDtype/lircrc ]
- then
- cat $TEMPLATES/LCD/$LCDtype/lircrc >> /etc/lircrc
- cat $TEMPLATES/LCD/$LCDtype/lircd.conf >> /etc/lircd.conf
- fi
- if [ -f $TEMPLATES/transmit/$Blastertype/lircd.conf ]
- then
- cat $TEMPLATES/transmit/$Blastertype/lircd.conf >> ${BASE}/etc/lircd.conf
- fi
- chmod 755 /etc/lircrc
- daemon_add="lircd $daemon_add"
- sv hup lircd
- ;;
+case $Remotetype in
+ no_remote) echo "No remote selected"
+ daemon_remove="lircd $daemon_remove"
+ ;;
+ tinker) echo "Remote in tinker mode"
+ ;;
+ *) echo "Setup remote"
+ mv ${BASE}/etc/lircd.conf ${BASE}/etc/lircd.conf.`date +%Y-%m-%d-%H-%M`
+ cd $TEMPLATES/remotes/$Remotetype
+ for i in lircd*
+ do
+ cat $i >> ${BASE}/etc/lircd.conf
+ done
+ cp lircrc ${BASE}/etc/lircrc
+ if [ -f $TEMPLATES/LCD/$LCDtype/lircrc ]
+ then
+ cat $TEMPLATES/LCD/$LCDtype/lircrc >> /etc/lircrc
+ cat $TEMPLATES/LCD/$LCDtype/lircd.conf >> /etc/lircd.conf
+ fi
+ if [ -f $TEMPLATES/transmit/$Blastertype/lircd.conf ]
+ then
+ cat $TEMPLATES/transmit/$Blastertype/lircd.conf >> ${BASE}/etc/lircd.conf
+ fi
+ chmod 755 /etc/lircrc
+ daemon_add="lircd $daemon_add"
+ sv hup lircd
+ ;;
esac
}
function setupblaster {
- #cd $TEMPLATES/transmit/$Blastertype
- #for i in lircd*
- #do
- # cat lircd.conf >> ${BASE}/etc/lircd.conf
- #done
- # REMOTE_NAME${BASE}/usr/bin/change_chan.sh=`grep name lircd.conf* |awk -F" " ' { print $2 } '`
- sed -e "s/^REMOTE_NAME=.*$/REMOTE_NAME=${Blastertype} /" $TEMPLATES/change_chan.sh > ${BASE}/usr/bin/change_chan.sh
- chmod 755 ${BASE}/usr/bin/change_chan.sh
- #channel change script change
- setupremote
+#cd $TEMPLATES/transmit/$Blastertype
+#for i in lircd*
+#do
+# cat lircd.conf >> ${BASE}/etc/lircd.conf
+#done
+# REMOTE_NAME${BASE}/usr/bin/change_chan.sh=`grep name lircd.conf* |awk -F" " ' { print $2 } '`
+sed -e "s/^REMOTE_NAME=.*$/REMOTE_NAME=${Blastertype} /" $TEMPLATES/change_chan.sh > ${BASE}/usr/bin/change_chan.sh
+chmod 755 ${BASE}/usr/bin/change_chan.sh
+#channel change script change
+setupremote
}
function setupevrouter {
- if [ x$UseEvrouter = x1 ]
- then
- case x$EvrouterConfig in
- xtinker )
- echo "do nothing for evrouter"
- ;;
- x ) echo "empty evrouter"
- ;;
- * ) echo "setup evrouter for $EvrouterConfig "
- cp $TEMPLATES/evrouter/$EvrouterConfig /etc/evrouter.cfg
- daemon_add="evrouter Xvfb $daemon_remove"
-
- ;;
- esac
- else
+if [ x$UseEvrouter = x1 ]
+then
+ case x$EvrouterConfig in
+ xtinker )
+ echo "do nothing for evrouter"
+ ;;
+ x ) echo "empty evrouter"
+ ;;
+ * ) echo "setup evrouter for $EvrouterConfig "
+ cp $TEMPLATES/evrouter/$EvrouterConfig /etc/evrouter.cfg
+ daemon_add="evrouter Xvfb $daemon_remove"
+
+ ;;
+ esac
+else
# disable evrouter
daemon_remove="evrouter Xvfb $daemon_remove"
- fi
+fi
@@ -249,64 +257,64 @@ function setupevrouter {
}
function setupLCD {
- case x$LCDtype in
+case x$LCDtype in
xtinker) echo "do nothing"
- ;;
+ ;;
xno_lcd) echo "disabling lcd"
- sv down lcdd
- /usr/bin/load-modules-mythvantage.sh UNLOAD LCD
- sed -i -e '/.*#LCD/d' ${BASE}/etc/modules.mythvantage
- daemon_remove="lcdd $daemon_remove"
- ;;
- x) echo "empty lcd" ;;
+ sv down lcdd
+ /usr/bin/load-modules-mythvantage.sh UNLOAD LCD
+ sed -i -e '/.*#LCD/d' ${BASE}/etc/modules.mythvantage
+ daemon_remove="lcdd $daemon_remove"
+ ;;
+ x) echo "empty lcd" ;;
- *) echo "setup lcd"
- if [ -f $TEMPLATES/LCD/$LCDtype/modules ]
- then
- sed -i -e '/.*#LCD/d' ${BASE}/etc/modules.mythvantage
- cat $TEMPLATES/LCD/$LCDtype/modules >> ${BASE}/etc/modules.mythvantage
- #should also modprobe
- fi
+ *) echo "setup lcd"
+ if [ -f $TEMPLATES/LCD/$LCDtype/modules ]
+ then
+ sed -i -e '/.*#LCD/d' ${BASE}/etc/modules.mythvantage
+ cat $TEMPLATES/LCD/$LCDtype/modules >> ${BASE}/etc/modules.mythvantage
+ #should also modprobe
+ fi
- if [ -f $TEMPLATES/LCD/$LCDtype/LCDd.conf ]
- then
- cp -f $TEMPLATES/LCD/$LCDtype/LCDd.conf /etc
- # install="lcdproc $install"
- daemon_add="lcdd $daemon_add"
- /usr/bin/load-modules-mythvantage.sh
- RESTART_FE="true"
- RESTART_LCD="true"
- fi
- #check if lirc capable,if so then call setupremote
- if [ -f $TEMPLATES/LCD/$LCDtype/lircrc ]
- then
- setupremote
- fi
- ;;
- esac
+ if [ -f $TEMPLATES/LCD/$LCDtype/LCDd.conf ]
+ then
+ cp -f $TEMPLATES/LCD/$LCDtype/LCDd.conf /etc
+ # install="lcdproc $install"
+ daemon_add="lcdd $daemon_add"
+ /usr/bin/load-modules-mythvantage.sh
+ RESTART_FE="true"
+ RESTART_LCD="true"
+ fi
+ #check if lirc capable,if so then call setupremote
+ if [ -f $TEMPLATES/LCD/$LCDtype/lircrc ]
+ then
+ setupremote
+ fi
+ ;;
+esac
}
function scrubnfs {
- cp /etc/fstab $TEMPLATES/fstab.conf.template
- grep -v nfs $TEMPLATES/fstab.conf.template > ${BASE}/etc/fstab
+cp /etc/fstab $TEMPLATES/fstab.conf.template
+grep -v nfs $TEMPLATES/fstab.conf.template > ${BASE}/etc/fstab
}
-function setupfstab () {
-# setupfstab $NFSserver $NFSshare $NFSmount
- echo "$1 $2 nfs" >> ${BASE}/etc/fstab
- if [ ! -e "$2" ]
- then
- mkdir -p "$2"
- chown mythtv:mythtv "$2"
- fi
- if [ x$DCONFIG = x ]
- then
- mount $2 &
- fi
+ function setupfstab () {
+ # setupfstab $NFSserver $NFSshare $NFSmount
+ echo "$1 $2 nfs" >> ${BASE}/etc/fstab
+ if [ ! -e "$2" ]
+ then
+ mkdir -p "$2"
+ chown mythtv:mythtv "$2"
+ fi
+ if [ x$DCONFIG = x ]
+ then
+ mount $2 &
+ fi
}
@@ -316,8 +324,8 @@ function setupncidclient
}
function setupnciddaemon {
- cp -f /etc/ncid/ncidd.conf $TEMPLATES/ncidd.conf.template
- sed -e "s/.*set ttyport.*$/set ttyport = \/dev\/$nciddSerialPort /" $TEMPLATES/ncidd.conf.template >${BASE}/etc/ncid/ncidd.conf
+cp -f /etc/ncid/ncidd.conf $TEMPLATES/ncidd.conf.template
+sed -e "s/.*set ttyport.*$/set ttyport = \/dev\/$nciddSerialPort /" $TEMPLATES/ncidd.conf.template >${BASE}/etc/ncid/ncidd.conf
}
@@ -337,18 +345,18 @@ restrict 10.0.0.0 mask 255.0.00 nomodify
#servers to sync with
EOF
- #this is used for backend or standlone types
- if [ $1 = "1" ]
- then
- echo "server ntp1.cs.wisc.edu" >> ${BASE}/etc/ntp.conf
- echo "server ntp3.sf-bay.org" >> ${BASE}/etc/ntp.conf
- echo "restrict ntp1.cs.wisc.edu noquery nomodify" >> ${BASE}/etc/ntp.conf
- echo "restrict ntp3.sf-bay.org noquery nomodify" >> ${BASE}/etc/ntp.conf
+#this is used for backend or standlone types
+if [ $1 = "1" ]
+then
+ echo "server ntp1.cs.wisc.edu" >> ${BASE}/etc/ntp.conf
+ echo "server ntp3.sf-bay.org" >> ${BASE}/etc/ntp.conf
+ echo "restrict ntp1.cs.wisc.edu noquery nomodify" >> ${BASE}/etc/ntp.conf
+ echo "restrict ntp3.sf-bay.org noquery nomodify" >> ${BASE}/etc/ntp.conf
- else
- echo "server $dbhost" >> ${BASE}/etc/ntp.conf
- echo "restrict $dbhost noquery nomodify" >> ${BASE}/etc/ntp.conf
- fi
+else
+ echo "server $dbhost" >> ${BASE}/etc/ntp.conf
+ echo "restrict $dbhost noquery nomodify" >> ${BASE}/etc/ntp.conf
+fi
}
@@ -360,19 +368,19 @@ pkglistremove=""
#default enabled
for i in mythcontrols mythgallery mythmovietime mythmusic mythsmolt mythvideo
do
-eval pkgvalue=\$${i}
+ eval pkgvalue=\$${i}
-if [ x$pkgvalue = x ]
- then
- pkglistinstall="$pkglistinstall $i$postfix"
- else
- if [ x$pkgvalue = x1 ]
- then
- pkglistinstall="$pkglistinstall $i$postfix"
- else
- pkglistremove="$pkglistremove $i$postfix"
- fi
- fi
+ if [ x$pkgvalue = x ]
+ then
+ pkglistinstall="$pkglistinstall $i$postfix"
+ else
+ if [ x$pkgvalue = x1 ]
+ then
+ pkglistinstall="$pkglistinstall $i$postfix"
+ else
+ pkglistremove="$pkglistremove $i$postfix"
+ fi
+ fi
@@ -381,38 +389,38 @@ done
#default disabled
- for i in mythphone mytharchive mythbrowser mythnews mythgame mythflix mythweather
- do
-eval pkgvalue=\$${i}
-
-if [ x$pkgvalue = x ]
- then
- pkglistremove="$pkglistremove $i$postfix"
- else
- if [ x$pkgvalue = x1 ]
- then
- pkglistinstall="$pkglistinstall $i$postfix"
- else
- pkglistremove="$pkglistremove $i$postfix"
- fi
- fi
- done
+for i in mythphone mytharchive mythbrowser mythnews mythgame mythflix mythweather
+do
+ eval pkgvalue=\$${i}
+
+ if [ x$pkgvalue = x ]
+ then
+ pkglistremove="$pkglistremove $i$postfix"
+ else
+ if [ x$pkgvalue = x1 ]
+ then
+ pkglistinstall="$pkglistinstall $i$postfix"
+ else
+ pkglistremove="$pkglistremove $i$postfix"
+ fi
+ fi
+done
install="$pkglistinstall $install"
remove="$pkglistremove $remove"
}
function LCDcheck () {
- case x$LCDtype in
+case x$LCDtype in
xtinker) echo "do nothing lcd "
- ;;
+ ;;
xno_lcd) echo "no lcd "
- ;;
+ ;;
xxosd) install="xosd lcdproc $install"
- ;;
- x) echo "lcd empty "
- ;;
- *)
- install="lcdproc $install"
+ ;;
+ x) echo "lcd empty "
+ ;;
+ *)
+ install="lcdproc $install"
;;
esac
}
@@ -427,164 +435,164 @@ if [ ! -f $PKGBLACKLIST ]
then
touch $PKGBLACKLIST
fi
- for i in $remove
- do
+for i in $remove
+do
echo "-----------$i --------------"
grep -q $i $PKGBLACKLIST
if [ $? = 1 ]
then
pacman -Q $i 2>/dev/null
#VAR=`pacman -Q $i 2>&1 `
- if [ $? = 0 ]
+ if [ $? = 0 ]
+ then
+ if [ $i = "mythweb$postfix" ]
then
- if [ $i = "mythweb$postfix" ]
- then
- pacman --noconfirm -R mythweb$postfix
- echo removed $i
- else
- pacman --noconfirm -Rs $i
- echo removed $i
- fi
+ pacman --noconfirm -R mythweb$postfix
+ echo removed $i
+ else
+ pacman --noconfirm -Rs $i
+ echo removed $i
fi
+ fi
else
echo "$i is black listed"
fi
- done
- # fi
+done
+# fi
- for i in $install
- do
+for i in $install
+do
echo "-----------$i --------------"
grep -q $i $PKGBLACKLIST
if [ $? = 1 ]
then
- pacman -Q $i 2>/dev/null
- #VAR=`pacman -Q $i 2>&1 `
- # echo $VAR |grep -vq error:
+ pacman -Q $i 2>/dev/null
+ #VAR=`pacman -Q $i 2>&1 `
+ # echo $VAR |grep -vq error:
- if [ ! $? = 0 ]
- then
- pacman --noconfirm -Sf $i
- echo installed $i
- else
- echo "$i already installed"
- fi
+ if [ ! $? = 0 ]
+ then
+ pacman --noconfirm -Sf $i
+ echo installed $i
+ else
+ echo "$i already installed"
+ fi
else
- echo "$i is black listed"
+ echo "$i is black listed"
fi
- done
+done
}
function daemons {
echo "Daemons on boot"
- for i in $daemon_remove
- do
- sv check $i 1>/dev/null
- status=$?
- if [ $status -eq 0 ]
- then
- sv down $i
- fi
- remove_service.sh $i
- done
+for i in $daemon_remove
+do
+ sv check $i 1>/dev/null
+ status=$?
+ if [ $status -eq 0 ]
+ then
+ sv down $i
+ fi
+ remove_service.sh $i
+done
- for i in $daemon_add
- do
- sv check $i 1>/dev/null
- status=$?
- add_service.sh $i
-
- if [ $status -eq 0 ]
- then
- case $i in
- mysql*) sv hup $i
- ;;
- mythback*) sv hup $i
- ;;
- lirc* ) sv hup $i
- ;;
- frontend) sv check frontend 1>/dev/null
- ;;
-
- smbd ) sv hup $i
- ;;
- nmbd ) sv hup $i
- ;;
- evrouter) sv restart $i
- ;;
- *) sv down $i
- sleep 1
- sv up $i
- ;;
- esac
- fi
-
- done
+for i in $daemon_add
+do
+ sv check $i 1>/dev/null
+ status=$?
+ add_service.sh $i
+
+ if [ $status -eq 0 ]
+ then
+ case $i in
+ mysql*) sv hup $i
+ ;;
+ mythback*) sv hup $i
+ ;;
+ lirc* ) sv hup $i
+ ;;
+ frontend) sv check frontend 1>/dev/null
+ ;;
+
+ smbd ) sv hup $i
+ ;;
+ nmbd ) sv hup $i
+ ;;
+ evrouter) sv restart $i
+ ;;
+ *) sv down $i
+ sleep 1
+ sv up $i
+ ;;
+ esac
+ fi
+
+done
}
function services
{
-ser_install=""
-ser_daemon_add=""
-ser_remove=""
-ser_daemon_remove=""
-if [ x$UseEvrouter = x1 ]
-then
- ser_daemon_add="evrouter Xvfb $ser_daemon_add"
-else
- ser_daemon_remove="evrouter Xvfb $ser_remove"
-fi
+ ser_install=""
+ ser_daemon_add=""
+ ser_remove=""
+ ser_daemon_remove=""
+ if [ x$UseEvrouter = x1 ]
+ then
+ ser_daemon_add="evrouter Xvfb $ser_daemon_add"
+ else
+ ser_daemon_remove="evrouter Xvfb $ser_remove"
+ fi
-if [ x$RunDHCP = x1 ]
-then
- ser_daemon_add="dnsmasq $ser_daemon_add"
- ser_install="dnsmasq mvpmc $ser_install"
+ if [ x$RunDHCP = x1 ]
+ then
+ ser_daemon_add="dnsmasq $ser_daemon_add"
+ ser_install="dnsmasq mvpmc $ser_install"
-else
- ser_daemon_remove="dnsmasq $ser_daemon_remove"
- ser_remove="dnsmasq mvpmc $ser_remove"
-fi
+ else
+ ser_daemon_remove="dnsmasq $ser_daemon_remove"
+ ser_remove="dnsmasq mvpmc $ser_remove"
+ fi
-if [ x$RunFrontend = x1 ]
-then
- ser_daemon_add="frontend hal ghosd $ser_daemon_add"
- ser_install="ghosd $ser_install"
- showX=true
- else
- ser_daemon_remove="frontend hal $ser_daemon_remove"
- ser_remove="$ser_remove"
- fi
-
-if [ x$UseMythWEB = x1 ]
-then
- ser_install="lighttpd mythweb$postfix $ser_install"
- ser_daemon_add="lighttpd $ser_daemon_add"
- else
- ser_remove="mythweb$postfix $ser_remove"
- ser_daemon_remove="$ser_daemon_remove"
- fi
-
-#samba
-if [ x$UseSamba = x1 ]
-then
+ if [ x$RunFrontend = x1 ]
+ then
+ ser_daemon_add="frontend hal ghosd $ser_daemon_add"
+ ser_install="ghosd $ser_install"
+ showX=true
+ else
+ ser_daemon_remove="frontend hal $ser_daemon_remove"
+ ser_remove="$ser_remove"
+ fi
+
+ if [ x$UseMythWEB = x1 ]
+ then
+ ser_install="lighttpd mythweb$postfix $ser_install"
+ ser_daemon_add="lighttpd $ser_daemon_add"
+ else
+ ser_remove="mythweb$postfix $ser_remove"
+ ser_daemon_remove="$ser_daemon_remove"
+ fi
+
+ #samba
+ if [ x$UseSamba = x1 ]
+ then
ser_install="samba $ser_install"
ser_daemon_add="nmbd smbd $ser_daemon_add "
if [ x$Samba_mediareadonly = x1 ]
- then
- smreadonly="no"
- else
- smreadonly="yes"
+ then
+ smreadonly="no"
+ else
+ smreadonly="yes"
fi
if [ x$Samba_homereadonly = x1 ]
- then
- shreadonly="no"
- else
- shreadonly="yes"
+ then
+ shreadonly="no"
+ else
+ shreadonly="yes"
fi
if [ ! -d ${BASE}/etc/samba ]
@@ -597,7 +605,7 @@ then
install -D -m755 ${BASE}/data/home/mythtv/templates/smb.conf ${BASE}/etc/samba/smb.conf
else
sed -e "s/^.*workgroup =.*$/ workgroup = $Samba_domain/g " \
- -e "s/^.*server string = .*$/ server string = $hostname/g" $TEMPLATES/samba/smb.conf.template > ${BASE}/etc/samba/smb.conf
+ -e "s/^.*server string = .*$/ server string = $hostname/g" $TEMPLATES/samba/smb.conf.template > ${BASE}/etc/samba/smb.conf
if [ x$Samba_media = "x1" ]
then
@@ -613,62 +621,62 @@ then
fi
fi
-else
+ else
ser_remove="samba $ser_remove"
ser_install="smbclient $ser_install"
ser_daemon_remove="smbd nmbd $ser_daemon_remove"
-fi
+ fi
-if [ x$UseNFS = x1 ]
-then
- ser_install="nfs-utils portmap $ser_install"
- ser_daemon_add="nfsd nfslock portmap $ser_daemon_add"
- sed -e "s/REPLACEME/*/g" $TEMPLATES/exports.template > ${BASE}/etc/exports
+ if [ x$UseNFS = x1 ]
+ then
+ ser_install="nfs-utils portmap $ser_install"
+ ser_daemon_add="nfsd nfslock portmap $ser_daemon_add"
+ sed -e "s/REPLACEME/*/g" $TEMPLATES/exports.template > ${BASE}/etc/exports
-else
- ser_remove="$ser_remove"
- ser_daemon_remove="nfsd nfslock $ser_daemon_remove"
-fi
+ else
+ ser_remove="$ser_remove"
+ ser_daemon_remove="nfsd nfslock $ser_daemon_remove"
+ fi
-if [ x$Runncidd = x1 ]
-then
- ser_daemon_add="ncidd ncid $ser_daemon_add"
- ser_install="ncid $ser_install"
- else
- ser_daemon_remove="ncidd ncid $ser_daemon_remove"
- ser_remove="ncid $ser_remove"
- fi
-if [ x$UseEvrouter = x1 ]
-then
- ser_install="evrouter Xvfb $ser_install"
- else
- ser_remove="evrouter $ser_remove"
-fi
-#Setting the default, just to avoid the or statement..
-if [ x$UseHobbit = x ]
-then
- UseHobbit=1
-fi
+ if [ x$Runncidd = x1 ]
+ then
+ ser_daemon_add="ncidd ncid $ser_daemon_add"
+ ser_install="ncid $ser_install"
+ else
+ ser_daemon_remove="ncidd ncid $ser_daemon_remove"
+ ser_remove="ncid $ser_remove"
+ fi
+ if [ x$UseEvrouter = x1 ]
+ then
+ ser_install="evrouter Xvfb $ser_install"
+ else
+ ser_remove="evrouter $ser_remove"
+ fi
+ #Setting the default, just to avoid the or statement..
+ if [ x$UseHobbit = x ]
+ then
+ UseHobbit=1
+ fi
-if [ x$UseHobbit = x1 ]
-then
- case $SystemType in
- Standalone|Master_backend )
- ser_daemon_add="hobbit $ser_daemon_add"
- ser_install="hobbitserver $ser_install"
- ;;
+ if [ x$UseHobbit = x1 ]
+ then
+ case $SystemType in
+ Standalone|Master_backend )
+ ser_daemon_add="hobbit $ser_daemon_add"
+ ser_install="hobbitserver $ser_install"
+ ;;
- *) ser_daemon_add="hobbit-client $ser_daemon_add"
- ser_install="hobbit-client $ser_install"
- ;;
+ *) ser_daemon_add="hobbit-client $ser_daemon_add"
+ ser_install="hobbit-client $ser_install"
+ ;;
esac
-else
- ser_daemon_remove="hobbit hobbit-client $ser_daemon_remove"
- ser_remove="hobbit-client hobbitserver $ser_remove"
- rm -f /data/srv/httpd/htdocs/hobbit/index.html
+ else
+ ser_daemon_remove="hobbit hobbit-client $ser_daemon_remove"
+ ser_remove="hobbit-client hobbitserver $ser_remove"
+ rm -f /data/srv/httpd/htdocs/hobbit/index.html
- fi
+ fi
@@ -705,42 +713,42 @@ fi
function setuppacman () {
#setup link to httpd dir
echo "Configuring pacman"
- if [ ! x$1 = x ]
+if [ ! x$1 = x ]
+then
+ ln -s ${BASE}/data/var ${BASE}/data/srv/httpd/htdocs/repo
+ echo "creating the link for the pacman repo mirror"
+fi
+
+for i in mv-core mv-core-testing mv-extra mv-extra-testing
+do
+ echo "[$i]" > ${BASE}/etc/pacman.d/$i
+ #add mirror if needed
+ if [ x$PKG_MIRROR = x1 ]
then
- ln -s ${BASE}/data/var ${BASE}/data/srv/httpd/htdocs/repo
- echo "creating the link for the pacman repo mirror"
+ echo " Server = http://$dbhost/repo/$i " >> ${BASE}/etc/pacman.d/$i
fi
+ #add user templates
+ USERTEMPLATES="/data/home/mythtv/templates"
+ if [ -f $USERTEMPLATES/sources/$i ]
+ then
+ echo "Adding user $i"
+ cat $USERTEMPLATES/sources/$i >> ${BASE}/etc/pacman.d/$i
+ fi
+ cat $TEMPLATES/sources/$i >> ${BASE}/etc/pacman.d/$i
+ echo "setting local mirror to $dbhost for $i "
+done
- for i in mv-core mv-core-testing mv-extra mv-extra-testing
- do
- echo "[$i]" > ${BASE}/etc/pacman.d/$i
- #add mirror if needed
- if [ x$PKG_MIRROR = x1 ]
- then
- echo " Server = http://$dbhost/repo/$i " >> ${BASE}/etc/pacman.d/$i
- fi
- #add user templates
- USERTEMPLATES="/data/home/mythtv/templates"
- if [ -f $USERTEMPLATES/sources/$i ]
- then
- echo "Adding user $i"
- cat $USERTEMPLATES/sources/$i >> ${BASE}/etc/pacman.d/$i
- fi
- cat $TEMPLATES/sources/$i >> ${BASE}/etc/pacman.d/$i
- echo "setting local mirror to $dbhost for $i "
- done
-
- #sed -e "s/REPLACEME/$dbhost/g" $TEMPLATES/sources/svc_pkg > /etc/pacman.d/svc_pkg
+#sed -e "s/REPLACEME/$dbhost/g" $TEMPLATES/sources/svc_pkg > /etc/pacman.d/svc_pkg
}
function setupzipcode () {
- if [ ! x$zipcode = x ]
- then
- ${MV_ROOT}/bin/restore_default_settings.sh -c ZIP -z $zipcode
- fi
+if [ ! x$zipcode = x ]
+then
+ ${MV_ROOT}/bin/restore_default_settings.sh -c ZIP -z $zipcode
+fi
}
function process_nfsmap () {
@@ -759,58 +767,58 @@ then
fi
fi
else
- mv -f /tmp/nfsmap /tmp/nfsmap.old
- wget -O /tmp/nfsmap http://$1:1337/templates/nfsmap
- if [ $? = 0 ]
- then
- NFSMAP="/tmp/nfsmap"
- fi
+ mv -f /tmp/nfsmap /tmp/nfsmap.old
+ wget -O /tmp/nfsmap http://$1:1337/templates/nfsmap
+ if [ $? = 0 ]
+ then
+ NFSMAP="/tmp/nfsmap"
+ fi
fi
- if [ -f $NFSMAP ]
- then
- #read in file
- while read line
- do
- NFSserver=`echo "$line"|cut -d" " -f1`
- NFSmount=`echo "$line"|cut -d" " -f2`
- setupfstab $NFSserver $NFSmount
- done <$NFSMAP
- else
- echo "couldn't find nfsmap"
+if [ -f $NFSMAP ]
+then
+ #read in file
+ while read line
+ do
+ NFSserver=`echo "$line"|cut -d" " -f1`
+ NFSmount=`echo "$line"|cut -d" " -f2`
+ setupfstab $NFSserver $NFSmount
+ done <$NFSMAP
+else
+ echo "couldn't find nfsmap"
- fi
+fi
}
function setupcnfs () {
- scrubnfs
- if [ $HaveCentralNFS = "yes" ]
- then
- case x$NFSserver in
- xfile:nfsmap )
- process_nfsmap noip
- ;;
- *:nfsmap )
- nfsmapip=`echo "$NFSserver" | cut -d: -f1 `
- process_nfsmap $nfsmapip
- ;;
- *) setupfstab $NFSserver $NFSmount
- esac
-
- #if [ ! x"$NFSserver" = "xfile:nfsmap" ]
- #then
- # setupfstab $NFSserver $NFSmount
- #else
- # process_nfsmap
- #fi
- else
- echo "fe_nfs"
- #if no central nfs found, then use the mbe.
- if [ $SystemType = "Frontend_only" ]
- then
- setupfstab ${dbhost}:/data/media /data/media
- fi
- fi
+scrubnfs
+if [ $HaveCentralNFS = "yes" ]
+then
+ case x$NFSserver in
+ xfile:nfsmap )
+ process_nfsmap noip
+ ;;
+ *:nfsmap )
+ nfsmapip=`echo "$NFSserver" | cut -d: -f1 `
+ process_nfsmap $nfsmapip
+ ;;
+ *) setupfstab $NFSserver $NFSmount
+ esac
+
+ #if [ ! x"$NFSserver" = "xfile:nfsmap" ]
+ #then
+ # setupfstab $NFSserver $NFSmount
+ #else
+ # process_nfsmap
+ #fi
+else
+ echo "fe_nfs"
+ #if no central nfs found, then use the mbe.
+ if [ $SystemType = "Frontend_only" ]
+ then
+ setupfstab ${dbhost}:/data/media /data/media
+ fi
+fi
}
@@ -866,32 +874,32 @@ if [ x$RunDHCP = x1 ]
then
echo "DNSMASQ setup"
-#set default route to my GW
-COMMAND="%s/^dhcp-option=3.*$/dhcp-option=3,${route}/"
-ex ${BASE}/etc/dnsmasq.conf <<EOF
-:$COMMAND
-:wq
-EOF
-
-#setup dns to my ip
-COMMAND="%s/^dhcp-option=6.*$/dhcp-option=6,${MYTHIP}/"
-ex ${BASE}/etc/dnsmasq.conf <<EOF
-:$COMMAND
-:wq
-EOF
-
-
-#change nfsroot to my ip
-COMMAND="%s/nfsroot=.*:/nfsroot=${MYTHIP}:/"
-ex ${BASE}/data/srv/tftp/pxelinux.cfg/default <<EOF
-:$COMMAND
-:wq
-EOF
-
-#add 127.0.0.1 to /etc/resolv.conf
- echo "search lan" > ${BASE}/etc/resolv.conf
- echo "nameserver 127.0.0.1" >> ${BASE}/etc/resolv.conf
- echo "nameserver $nameserver" >> ${BASE}/etc/resolv.conf
+ #set default route to my GW
+ COMMAND="%s/^dhcp-option=3.*$/dhcp-option=3,${route}/"
+ ex ${BASE}/etc/dnsmasq.conf <<EOF
+ :$COMMAND
+ :wq
+ EOF
+
+ #setup dns to my ip
+ COMMAND="%s/^dhcp-option=6.*$/dhcp-option=6,${MYTHIP}/"
+ ex ${BASE}/etc/dnsmasq.conf <<EOF
+ :$COMMAND
+ :wq
+ EOF
+
+
+ #change nfsroot to my ip
+ COMMAND="%s/nfsroot=.*:/nfsroot=${MYTHIP}:/"
+ ex ${BASE}/data/srv/tftp/pxelinux.cfg/default <<EOF
+ :$COMMAND
+ :wq
+ EOF
+
+ #add 127.0.0.1 to /etc/resolv.conf
+ echo "search lan" > ${BASE}/etc/resolv.conf
+ echo "nameserver 127.0.0.1" >> ${BASE}/etc/resolv.conf
+ echo "nameserver $nameserver" >> ${BASE}/etc/resolv.conf
fi
#setup dongle.config
@@ -908,23 +916,23 @@ EOF
}
function reloadfe(){
- PID=`ps -ef |grep mythfrontend|grep -v grep |awk '{print $2 }'`
- /usr/bin/backend_control.sh clearcache behost $dbhost
- if [ x$RESTART_LCD = xtrue ]
- then
+PID=`ps -ef |grep mythfrontend|grep -v grep |awk '{print $2 }'`
+/usr/bin/backend_control.sh clearcache behost $dbhost
+if [ x$RESTART_LCD = xtrue ]
+then
killall -9 mythlcdserver
- fi
- kill -s USR1 $PID
+fi
+kill -s USR1 $PID
}
function setup_db (){
- install="mysql avahli"
- daemon_add="mysql"
- packages
- daemons
+install="mysql avahli"
+daemon_add="mysql"
+packages
+daemons
status=1
mysqlstatus=1
while [ ! $status = 0 ]
@@ -935,7 +943,7 @@ do
mysqlstatus=$?
if [ $mysqlstatus = 0 ]
then
- mysql -e "show databases;"
+ mysql -e "show databases;"
showstatus=$?
if [ $showstatus = 0 ]
then
@@ -949,13 +957,13 @@ do
#update database to allow user jobs on this host.
$MV_ROOT/bin/restore_default_settings.sh -c USERJOBALLOW
$MV_ROOT/bin/restore_default_settings.sh -c ACCESSCONTROL
- if [ -d /data/srv/mysql/mythconverg ]
- then
- pacman --noconfirm -R webcalendar
- pacman --noconfirm --nodeps -S webcalendar
- status=0
- fi
- fi
+ if [ -d /data/srv/mysql/mythconverg ]
+ then
+ pacman --noconfirm -R webcalendar
+ pacman --noconfirm --nodeps -S webcalendar
+ status=0
+ fi
+ fi
fi
done
}
@@ -970,45 +978,45 @@ hosttypechange="false"
for i in $LIST
- do
- echo $i
- case $i in
- misc) showmisc="true"
- ;;
- sleep) showsleep="true"
- ;;
- hostype) showhost="true"
- showX="true"
- ;;
- hostypec) hosttypechange="true"
- ;;
- advanced) showadvanced="true"
- #showhost="true"
- ;;
- audio) showaudio="true"
- ;;
- network) shownetwork="true"
- ;;
- advancedX) showX="true"
- ;;
- restartfe) killall -9 mythfrontend
- killall -9 mythwelcome
- exit 0
- ;;
- reloadfe) reloadfe
- ;;
+do
+ echo $i
+ case $i in
+ misc) showmisc="true"
+ ;;
+ sleep) showsleep="true"
+ ;;
+ hostype) showhost="true"
+ showX="true"
+ ;;
+ hostypec) hosttypechange="true"
+ ;;
+ advanced) showadvanced="true"
+ #showhost="true"
+ ;;
+ audio) showaudio="true"
+ ;;
+ network) shownetwork="true"
+ ;;
+ advancedX) showX="true"
+ ;;
+ restartfe) killall -9 mythfrontend
+ killall -9 mythwelcome
+ exit 0
+ ;;
+ reloadfe) reloadfe
+ ;;
- this_is_install) MV_NEW_INSTALL="true"
- ;;
- NETINSTALL) RESTART_NETWORK="false"
- NET_INSTALL="true"
+ this_is_install) MV_NEW_INSTALL="true"
+ ;;
+ NETINSTALL) RESTART_NETWORK="false"
+ NET_INSTALL="true"
- esac
- done
+ esac
+done
if [ x$MV_NEW_INSTALL = xtrue ]
then
- hosttypechange="false"
+ hosttypechange="false"
fi
@@ -1037,96 +1045,96 @@ then
setup_network
vnc_check
if [ x$USEVNC = x1 ]
- then
- echo "reloading network"
- ${BASE}/etc/net/scripts/network.init reload
- else
- echo "netboot/vnc, will not restart network"
- fi
+ then
+ echo "reloading network"
+ ${BASE}/etc/net/scripts/network.init reload
+ else
+ echo "netboot/vnc, will not restart network"
+ fi
fi
if [ x$showhost = "xtrue" ]
then
-case $SystemType in
- Standalone)
- setupntp 1
- services
- if [ x$hosttypechange = "xtrue" ]
- then
- setup_db
- fi
- if [ -f ${BASE}/etc/avahi/services/mysql.service ]
- then
- rm -f ${BASE}/etc/avahi/services/mysql.service
- sudo sv restart avahi
- fi
+ case $SystemType in
+ Standalone)
+ setupntp 1
+ services
+ if [ x$hosttypechange = "xtrue" ]
+ then
+ setup_db
+ fi
+ if [ -f ${BASE}/etc/avahi/services/mysql.service ]
+ then
+ rm -f ${BASE}/etc/avahi/services/mysql.service
+ sudo sv restart avahi
+ fi
- install="lighttpd mysql mythdb-initial avahli myth2ipod mythtv-status portmap local-website webcalendar php $ser_install"
- remove="none $ser_remove"
+ install="lighttpd mysql mythdb-initial avahli myth2ipod mythtv-status portmap local-website webcalendar php $ser_install"
+ remove="none $ser_remove"
- daemon_add="lighttpd mysql mythbackend avahi portmap $ser_daemon_add"
- daemon_remove="none $ser_daemon_remove"
+ daemon_add="lighttpd mysql mythbackend avahi portmap $ser_daemon_add"
+ daemon_remove="none $ser_daemon_remove"
- ;;
- Master_backend)
- setupntp 1
- services
+ ;;
+ Master_backend)
+ setupntp 1
+ services
- if [ ! -f ${BASE}/etc/avahi/services/mysql.service ]
- then
- mkdir ${BASE}/etc/avahi/services
- cp $TEMPLATES/mysql.service ${BASE}/etc/avahi/services/mysql.service
- sudo sv restart avahi
- fi
+ if [ ! -f ${BASE}/etc/avahi/services/mysql.service ]
+ then
+ mkdir ${BASE}/etc/avahi/services
+ cp $TEMPLATES/mysql.service ${BASE}/etc/avahi/services/mysql.service
+ sudo sv restart avahi
+ fi
- install="lighttpd local-website mysql mythdb-initial webcalendar php avahi portmap myth2ipod mythtv-status func $ser_install "
- remove="$ser_remove"
+ install="lighttpd local-website mysql mythdb-initial webcalendar php avahi portmap myth2ipod mythtv-status func $ser_install "
+ remove="$ser_remove"
- daemon_add="lighttpd mysql mythbackend avahi portmap certmaster $ser_daemon_add"
- daemon_remove="$ser_daemon_remove"
- ;;
- Slave_backend)
- setupntp 0
- services
- if [ x$hosttypechange = "xtrue" ]
- then
- setup_db
- fi
- if [ -f ${BASE}/etc/avahi/services/mysql.service ]
- then
- rm -f ${BASE}/etc/avahi/services/mysql.service
- sudo sv restart avahi
- fi
+ daemon_add="lighttpd mysql mythbackend avahi portmap certmaster $ser_daemon_add"
+ daemon_remove="$ser_daemon_remove"
+ ;;
+ Slave_backend)
+ setupntp 0
+ services
+ if [ x$hosttypechange = "xtrue" ]
+ then
+ setup_db
+ fi
+ if [ -f ${BASE}/etc/avahi/services/mysql.service ]
+ then
+ rm -f ${BASE}/etc/avahi/services/mysql.service
+ sudo sv restart avahi
+ fi
- #cp $TEMPLATES/mysql.service ${BASE}/etc/avahi/services/mysql.service
- install="mysql avahi func $ser_install "
- remove=" $ser_remove"
+ #cp $TEMPLATES/mysql.service ${BASE}/etc/avahi/services/mysql.service
+ install="mysql avahi func $ser_install "
+ remove=" $ser_remove"
- daemon_add="mythbackend avahi portmap mythtv-status funcd $ser_daemon_add"
- daemon_remove="$ser_daemon_remove"
- ;;
- Frontend_only)
+ daemon_add="mythbackend avahi portmap mythtv-status funcd $ser_daemon_add"
+ daemon_remove="$ser_daemon_remove"
+ ;;
+ Frontend_only)
#Add values for services
setupntp 0
services
if [ -f ${BASE}/etc/avahi/services/mysql.service ]
- then
- rm -f ${BASE}/etc/avahi/services/mysql.service
- sudo sv restart avahi
- fi
+ then
+ rm -f ${BASE}/etc/avahi/services/mysql.service
+ sudo sv restart avahi
+ fi
install="libmysqlclient mysql-clients portmap avahi func $ser_install"
remove="mysql local-website lighttpd php mythweb$postfix $ser_remove"
daemon_add="avahi portmap funcd $ser_daemon_add "
daemon_remove="mysql lighttpd mythbackend $ser_daemon_remove"
- ;;
+ ;;
-esac
-setupSyslog
-setupfuncminion
+ esac
+ setupSyslog
+ setupfuncminion
fi
#apply these to ALL types
@@ -1149,7 +1157,7 @@ fi
if [ x$showaudio = "xtrue" ]
then
- #setupsoundtype
+ #setupsoundtype
if [ ! x$Audiotype = xtinker ]
then
${MV_ROOT}/bin/soundconfig.sh -t real -i $Audiotype -d $SoundDevice
@@ -1163,15 +1171,15 @@ packages
if [ x$showmisc = "xtrue" ]
then
- setupzipcode
- settimezone
+ setupzipcode
+ settimezone
setupcnfs
fi
#sleep
if [ x$showsleep = "xtrue" ]
then
- setupsleep
+ setupsleep
fi
if [ x$showX = "xtrue" ]
@@ -1195,10 +1203,10 @@ then
if [ x$SystemType = xMaster_backend ]
then
setuppacman link
- else
+ else
setuppacman
fi
- fi
+ fi
setupncidclient
setupnciddaemon
setupbootsplash
@@ -1227,34 +1235,34 @@ fi
case $SystemType in
Standalone) smoltsystem=6
- MVRELEASE="$MVRELEASE (Standalone)"
- ;;
- Master_backend)
- if [ x$RunFrontend = x1 ]
- then
- smoltsystem=2
- MVRELEASE="$MVRELEASE (MBE with Frontend)"
- else
- smoltsystem=1
- MVRELEASE="$MVRELEASE (MBE)"
- fi
- ;;
- Slave_backend)
- if [ x$RunFrontend = x1 ]
- then
- smoltsystem=5
- MVRELEASE="$MVRELEASE (SLAVE with Frontend)"
- else
- smoltsystem=5
- MVRELEASE="$MVRELEASE (SLAVE)"
- fi
- ;;
- Frontend_only)
- smoltsystem=3
- MVRELEASE="$MVRELEASE ( Frontend only)"
- ;;
+ MVRELEASE="$MVRELEASE (Standalone)"
+ ;;
+ Master_backend)
+ if [ x$RunFrontend = x1 ]
+ then
+ smoltsystem=2
+ MVRELEASE="$MVRELEASE (MBE with Frontend)"
+ else
+ smoltsystem=1
+ MVRELEASE="$MVRELEASE (MBE)"
+ fi
+ ;;
+ Slave_backend)
+ if [ x$RunFrontend = x1 ]
+ then
+ smoltsystem=5
+ MVRELEASE="$MVRELEASE (SLAVE with Frontend)"
+ else
+ smoltsystem=5
+ MVRELEASE="$MVRELEASE (SLAVE)"
+ fi
+ ;;
+ Frontend_only)
+ smoltsystem=3
+ MVRELEASE="$MVRELEASE ( Frontend only)"
+ ;;
esac
echo $MVRELEASE > /etc/os_myth_release
-echo "systemtype=$smoltsystem" > /data/home/mythtv/.mythtv/smolt.info
-echo "remote=$Remotetype" >> /data/home/mythtv/.mythtv/smolt.info
+echo "systemtype=$smoltsystem" > /data/home/mythtv/.mythtv/smolt.info 2>/dev/null
+echo "remote=$Remotetype" >> /data/home/mythtv/.mythtv/smolt.info 2>/dev/null
diff --git a/abs/mv-core/MythVantage-config/templates/modules/lirc_i2c.conf b/abs/mv-core/MythVantage-config/templates/modules/lirc_i2c.conf
new file mode 100644
index 0000000..7b99f78
--- /dev/null
+++ b/abs/mv-core/MythVantage-config/templates/modules/lirc_i2c.conf
@@ -0,0 +1,2 @@
+alias char-major-61 lirc_i2c
+options lirc_i2c debug=0 minor=3
diff --git a/abs/mv-core/MythVantage-config/templates/remotes/i2c.id b/abs/mv-core/MythVantage-config/templates/remotes/i2c.id
new file mode 100644
index 0000000..50e89e9
--- /dev/null
+++ b/abs/mv-core/MythVantage-config/templates/remotes/i2c.id
@@ -0,0 +1,5 @@
+0070:4000|Hauppauge|WinTV PVR 250|hauppauge-grey
+0070:4009|Hauppauge|WinTV PVR 250|hauppauge-grey
+0070:4801|Hauppauge|WinTV PVR 250|hauppauge-grey
+0070:4803|Hauppauge|WinTV PVR 250|hauppauge-grey
+0070:0003|Hauppauge|WinTV PVR 250|hauppauge-grey \ No newline at end of file
diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/lircd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/lircd/run
index 0adfdc1..ceda8db 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/lircd/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/lircd/run
@@ -7,7 +7,7 @@ run_lircd2=false
function dvico_detect {
- if [ x$Remotetype = "dvico" ]
+ if [ x$Remotetype = "xdvico" ]
then
DEVICE="/dev/usb/hiddev0"
fi
@@ -33,7 +33,9 @@ case $ReceiverType in
Usb-imon)
DEVICE=/dev/lirc_imon
;;
-
+ Hauppauge)
+ DEVICE=/dev/lirc3
+ ;;
*)
DEVICE=`ls /dev/lirc[0-9] 2>/dev/null |sort |sed '/./,$!d'|head -n 1 `