summaryrefslogtreecommitdiffstats
path: root/abs/mv-core/MythVantage-system/startfrontend
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2008-11-09 03:14:58 (GMT)
committerJames Meyer <james.meyer@operamail.com>2008-11-09 03:14:58 (GMT)
commit5445907db788ab2c7c73ea19fc47d59c862fc6a3 (patch)
tree1b0a868eb5b9d6aa8e7835cbc49c05947b7c75fe /abs/mv-core/MythVantage-system/startfrontend
parentabc83d46637ebc63479ec745f05ae392f404f04e (diff)
downloadlinhes_pkgbuild-5445907db788ab2c7c73ea19fc47d59c862fc6a3.zip
linhes_pkgbuild-5445907db788ab2c7c73ea19fc47d59c862fc6a3.tar.gz
linhes_pkgbuild-5445907db788ab2c7c73ea19fc47d59c862fc6a3.tar.bz2
MythVantage-config (replaces live-installer) for MythVantage
MythVanate-system (replaces STB-system)
Diffstat (limited to 'abs/mv-core/MythVantage-system/startfrontend')
-rwxr-xr-xabs/mv-core/MythVantage-system/startfrontend147
1 files changed, 147 insertions, 0 deletions
diff --git a/abs/mv-core/MythVantage-system/startfrontend b/abs/mv-core/MythVantage-system/startfrontend
new file mode 100755
index 0000000..ba22900
--- /dev/null
+++ b/abs/mv-core/MythVantage-system/startfrontend
@@ -0,0 +1,147 @@
+#!/bin/sh
+. /etc/profile
+. /etc/systemconfig
+. /etc/X11/STBWINDOWMANAGER
+
+xhost +local:
+xhost +127.0.0.1
+xset -dpms s off
+export MALLOC_CHECK_=0
+#killall -q -9 xsay &
+#rm -rf /tmp/xsay* &
+
+function lirc_check {
+ lcmd=`irsend LIST "" "" 2>&1 `
+ status=$?
+ if [ $status = 0 ]
+ then
+ rc=0
+ else
+ echo $lcmd |grep -q "Connection refused"
+ status=$?
+ if [ $status = 0 ]
+ then
+ echo "lirc_check: lircd is not running"
+ else
+ echo " lirc_check: lircd is running but no receiver found"
+ fi
+ rc=1
+ fi
+ return $rc
+}
+
+
+
+
+$STBWINDOWMANAGER &
+keylaunch &
+/usr/bin/tilda &
+/usr/X11R6/bin/unclutter -root -idle 0 -jitter 400 -noevents &
+/usr/bin/xvattr -a XV_COLORKEY -v 0
+/usr/local/bin/mtd &
+/usr/bin/nvidia-settings -l
+/usr/bin/nvidia-settings -a InitialPixmapPlacement=2
+
+
+#if [ x$ncidclient = "x1" ]
+#then
+# ncid --no-gui &
+#fi
+
+if [ -f /opt/vmware/bin32/vmware-user-wrapper ]
+then
+ /opt/vmware/bin32/vmware-user-wrapper &
+fi
+
+if [ x$ShowTips = "x1" ]
+then
+# xsay -t 10 "Alt+h list shortcuts"
+bash -c "sleep 6;osdClient.pl localhost 5000 'ALT+h for shortcuts:::SYS' "&
+
+fi
+
+
+#wait for lirc
+if [ x$HostLircWait = x1 ]
+then
+ lcheck=5
+ lirc_check
+ status=$?
+
+ while [[ ! $status = 0 && ! $lcheck = 0 ]]
+ do
+ bash -c "osdClient.pl localhost 5000 'Waiting on remote - $lcheck:::SYS' "&
+ sudo sv restart lircd ; echo "restart lircd"
+ sleep .5
+ lirc_check
+ status=$?
+ lcheck=$((lcheck - 1))
+ done
+
+
+fi
+
+
+
+
+
+if [ ! $SystemType = "Frontend_only" ]
+then
+ if [ ! -f ~/.configured ]
+ then
+ autocard.py -g &
+ MythVantage -b
+ #0 yes
+ #1 yes/autodetech
+ #2 no
+ STATUS=$?
+ if [ ! $STATUS = 2 ]
+ then
+ /usr/bin/backend_control.sh stop BE 127.0.0.1
+ /usr/local/bin/mythtv-setup
+ /usr/bin/backend_control.sh start BE 127.0.0.1
+ fi
+ touch ~/.configured
+ fi
+else
+ #touch file for FE only(mythsmolt)
+ touch ~/.configured
+fi
+
+
+if [ x"$UseMythWelcome" = "x1" ]
+then
+ STARTCMD="/usr/local/bin/mythwelcome"
+else
+ STARTCMD="/usr/local/bin/mythfrontend -d"
+fi
+
+echo "====================================================================="
+echo "Starting $STARTCMD"
+#spawn fb to start mythsmolt
+firstboot.sh &
+
+while [ x = x ]
+do
+ if [ -f /tmp/nomfe ]
+ then
+ sleep 120
+ else
+ if [ -f /tmp/debug ]
+ then
+
+ echo "using gbd/debug"
+ gdb /usr/local/bin/mythfrontend -x $MV_ROOT/mfegdbcommands.txt
+ bash -c "osdClient.pl localhost 5000 'Restart: mdb.txt.mythfrontend:::SYS' "&
+ mv gdb.txt gdb.txt.mythfrontend
+ sleep 10
+
+ else
+ killall -9 irexec
+ /usr/bin/irexec &
+ $STARTCMD 2>&1
+ fi
+ fi
+echo "_______________________________________________________"
+done
+