diff options
author | James Meyer <james.meyer@operamail.com> | 2009-04-01 03:07:43 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2009-04-01 03:07:43 (GMT) |
commit | 2e3d0d812bc9459adea4b0dbf1b038dbd1e79dc0 (patch) | |
tree | 23353a165922bfbbd8fd334ef10ead163a22c376 /abs/core-testing/LinHES-config/systemconfig.sh | |
parent | 8e7344c420b147242aa3a0d3a902c9d13046b0d9 (diff) | |
download | linhes_pkgbuild-2e3d0d812bc9459adea4b0dbf1b038dbd1e79dc0.zip linhes_pkgbuild-2e3d0d812bc9459adea4b0dbf1b038dbd1e79dc0.tar.gz linhes_pkgbuild-2e3d0d812bc9459adea4b0dbf1b038dbd1e79dc0.tar.bz2 |
LinHES-config: reworked lirc configuration to make it easier to use.
currently hauppauge is broken.
Diffstat (limited to 'abs/core-testing/LinHES-config/systemconfig.sh')
-rwxr-xr-x | abs/core-testing/LinHES-config/systemconfig.sh | 264 |
1 files changed, 90 insertions, 174 deletions
diff --git a/abs/core-testing/LinHES-config/systemconfig.sh b/abs/core-testing/LinHES-config/systemconfig.sh index 2cb1a0c..72c5287 100755 --- a/abs/core-testing/LinHES-config/systemconfig.sh +++ b/abs/core-testing/LinHES-config/systemconfig.sh @@ -213,69 +213,6 @@ Hauppauge) echo "setup hauppauge reciever (lirc_i2c)" } -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 -f lircrc* $BASE/etc/lircrc 2> /dev/null - 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 - - if [ ! -e /home/mythtv/.mythtv/lircrc ] - then - if [ ! -d /home/mythtv/.mythtv ] - then - mkdir /home/mythtv/.mythtv - chown mythtv:mythtv /home/mythtv/.mythtv - fi - - ln -s /etc/lircrc /home/mythtv/.mythtv/lircrc 2> /dev/null - fi - if [ ! -e /home/mythtv/.lircrc ] - then - - ln -s /etc/lircrc /home/mythtv/.lircrc 2> /dev/null - fi - - - ;; -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 - -} function setupevrouter { if [ x$UseEvrouter = x1 ] @@ -302,46 +239,6 @@ function setupevrouter { } -function setupLCD { -case x$LCDtype in - xtinker) echo "do nothing" - ;; - xno_lcd) echo "disabling lcd" - sv down lcdd - 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 - - - if [ -f $TEMPLATES/LCD/$LCDtype/LCDd.conf ] - then - cp_and_log $TEMPLATES/LCD/$LCDtype/LCDd.conf /etc - # install="lcdproc $install" - daemon_add="lcdd $daemon_add" - 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 { @@ -479,6 +376,7 @@ install="$pkglistinstall $install" remove="$pkglistremove $remove" } + function LCDcheck () { case x$LCDtype in xtinker) echo "do nothing lcd " @@ -1239,6 +1137,12 @@ case $i in daemon_add=$ser_daemon_add daemon_remove=$ser_daemon_remove ;; + screensaver) + showscreensaver="true" + ;; + ir) + showir="true" + ;; this_is_install) MV_NEW_INSTALL="true" ;; @@ -1290,86 +1194,85 @@ 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 + . $MV_ROOT/bin/ir_config.sh + setupir + 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="mysql mythdb-initial avahli portmap nfslock local-website $ser_install" + install="mysql mythdb-initial avahli portmap nfslock local-website $ser_install" + remove="none $ser_remove" + daemon_add="mysql mythbackend avahi portmap nfslock netfs lighttpd $ser_daemon_add" + daemon_remove="none $ser_daemon_remove" - remove="none $ser_remove" + ;; + Master_backend) + setupntp 1 + services - daemon_add="mysql mythbackend avahi portmap nfslock netfs lighttpd $ser_daemon_add" - daemon_remove="none $ser_daemon_remove" + 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 - ;; -Master_backend) - setupntp 1 - services + install="mysql mythdb-initial avahi portmap nfslock local-website myth2ipod mythtv-status $ser_install " + remove="$ser_remove" - 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 + daemon_add="mysql mythbackend avahi portmap nfslock netfs lighttpd $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 - install="mysql mythdb-initial avahi portmap nfslock local-website myth2ipod mythtv-status $ser_install " - remove="$ser_remove" + #cp $TEMPLATES/mysql.service ${BASE}/etc/avahi/services/mysql.service + install="mysql avahi local-website portmap nfslock $ser_install " + remove=" $ser_remove" - daemon_add="mysql mythbackend avahi portmap nfslock netfs lighttpd $ser_daemon_add" - daemon_remove="$ser_daemon_remove" - ;; - Slave_backend) + daemon_add="mythbackend avahi portmap nfslock netfs lighttpd $ser_daemon_add" + daemon_remove="$ser_daemon_remove" + ;; + Frontend_only) + #Add values for services 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 + 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 local-website portmap nfslock $ser_install " - remove=" $ser_remove" + install="libmysqlclient mysql-clients portmap nfslock avahi local-website $ser_install" + remove="mysql mythweb$postfix $ser_remove" - daemon_add="mythbackend avahi portmap nfslock netfs lighttpd $ser_daemon_add" - daemon_remove="$ser_daemon_remove" + daemon_add="avahi portmap nfslock netfs lighttpd $ser_daemon_add " + daemon_remove="mysql mythbackend $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 - - install="libmysqlclient mysql-clients portmap nfslock avahi local-website $ser_install" - remove="mysql mythweb$postfix $ser_remove" - - daemon_add="avahi portmap nfslock netfs lighttpd $ser_daemon_add " - daemon_remove="mysql mythbackend $ser_daemon_remove" -;; - - -esac -#setupSyslog + esac + #setupSyslog fi @@ -1384,7 +1287,10 @@ if [ x$showhost = "xtrue" ] then setupmysqlnetwork setupmysql - setupremote + + #setupremote + #REMOTE FIND ME JM + #grab the new dbhost key #/usr/bin/grabkey.py fi @@ -1449,14 +1355,24 @@ then setuphobbitclient setupreceiver setupevrouter - setupblaster - setupLCD + #setupblaster + #setupLCD setupDNSMASQ - setupscreensaver + fi +if [ x$showscreensaver = xtrue ] +then + setupscreensaver +fi + +if [ x$showir = xtrue ] +then + . $MV_ROOT/bin/ir_config.sh + setupir +fi daemons #add check for lcd, and restart if needed. |