summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-system/LinHES-session
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2011-12-21 21:06:47 (GMT)
committerJames Meyer <james.meyer@operamail.com>2011-12-21 21:06:47 (GMT)
commitddab9d26651122643ad4f993812c6bf38d9fd911 (patch)
treedbb2233c9dfc399faf00a70ca9fe3ddb12242010 /abs/core/LinHES-system/LinHES-session
parent8e347fecbc74ed8a3dab9d78546ad9dd9cf2a232 (diff)
downloadlinhes_pkgbuild-ddab9d26651122643ad4f993812c6bf38d9fd911.zip
linhes_pkgbuild-ddab9d26651122643ad4f993812c6bf38d9fd911.tar.gz
linhes_pkgbuild-ddab9d26651122643ad4f993812c6bf38d9fd911.tar.bz2
LinHES-system/config: add install_supplemental_service.sh
This script will install and configure the extra web services and programs needed. LinHES-session: additional work on making the startup process a bit more modular.
Diffstat (limited to 'abs/core/LinHES-system/LinHES-session')
-rwxr-xr-xabs/core/LinHES-system/LinHES-session120
1 files changed, 53 insertions, 67 deletions
diff --git a/abs/core/LinHES-system/LinHES-session b/abs/core/LinHES-system/LinHES-session
index 39a60b0..626d346 100755
--- a/abs/core/LinHES-system/LinHES-session
+++ b/abs/core/LinHES-system/LinHES-session
@@ -46,10 +46,24 @@ export MALLOC_CHECK_=0
font="-adobe-helvetica-bold-*-*-*-34-*-*-*-*-*-*-*"
}
-function msg(){
+function msg_osd(){
echo -e "$1" | osd_cat --pos=middle --align=center --offset=200 --delay=5 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font &
}
+function msg_pyosd(){
+ /usr/LH/bin/xmsg.py -m "$1"
+}
+
+function msg(){
+ if [ x$STARTUP_STYLE = xmythvantage ]
+ then
+ msg_pyosd "$1"
+ else
+ msg_osd "$1"
+ fi
+
+}
+
function unclutter(){
if [ -e /etc/unclutter ]
@@ -101,14 +115,14 @@ function run_tilda(){
center=$[width/2]
sixtypercent=`echo "scale=0; ( $width*.6) / 1" |bc`
quarter_height=`echo "scale=0; ($height*.35) /1" |bc`
-
- if [ $sixtypercent -lt 700 ]
+
+ if [ $sixtypercent -lt 700 ]
then
sixtypercent=700
fi
- if [ $quarter_height -lt 350 ]
+ if [ $quarter_height -lt 350 ]
then
quarter_height=350
fi
@@ -202,16 +216,14 @@ function first_configure_default(){
function first_configure_mv(){
if [ ! $SystemType = "Frontend_only" ]
then
- if [ ! -f ~/.configured ]
- then
- autocard.py -g &
- MythVantage -b
- #/root/autocard.py -g &
- #/usr/local/bin/mythinstall -b
-
- #0 yes
- #1 yes/autodetech
- #2 no
+ if [ -f ~/.configure ]
+ then
+ #for now skip these
+ #autocard.py -g &
+ #MythVantage -b
+ #0 yes
+ #1 yes/autodetech
+ #2 no
STATUS=$?
if [ ! $STATUS = 2 ]
then
@@ -219,9 +231,10 @@ function first_configure_mv(){
/usr/local/bin/mythtv-setup
/usr/bin/backend_control.sh start BE 127.0.0.1
fi
- touch ~/.configured
- fi
+ rm ~/.configure
+ fi
fi
+
}
function start_myth() {
@@ -242,65 +255,39 @@ function start_myth() {
then
start_myth_mv
else
- start_myth_default
+ run_myth
fi
}
-function start_myth_default(){
-
+function run_myth(){
if [ -f /tmp/nomfe ]
- then
- exit 0
- else
- if [ -f /tmp/debug ]
then
- echo "using gbd/debug"
- gdb /usr/bin/mythfrontend -x $MV_ROOT/mfegdbcommands.txt
- mv gdb.txt gdb.txt.mythfrontend
- sleep 10
+ exit 0
else
- killall -9 irexec
- /usr/bin/irexec -d
- $STARTCMD 2>&1 &
+ if [ -f /tmp/debug ]
+ then
+ echo "using gbd/debug"
+ gdb /usr/bin/mythfrontend -x $MV_ROOT/mfegdbcommands.txt
+ mv gdb.txt gdb.txt.mythfrontend
+ sleep 5
+ else
+ killall -9 irexec
+ /usr/bin/irexec -d
+ $STARTCMD 2>&1 &
+ fi
fi
- fi
-
-
-
-
}
function start_myth_mv(){
-
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 "_______________________________________________________"
+ run_myth
+ echo "_______________________________________________________"
done
-
-
- }
+}
function set_background()
@@ -317,11 +304,8 @@ then
else
#if using mythvantage style, start the WM right away
# this is done so that starting mythtv can loop.
-
- if [ x$STARTUP_STYLE = xmythvantage ]
- then
- $WM &
- fi
+ $WM &
+ pid=$!
mouse_move
keylaunch
set_background
@@ -330,14 +314,16 @@ else
run_tilda
start_screensaver
show_help_tip
- #update_apple_trailers
+ update_apple_trailers
+
first_configure
start_myth
- # start windowmanger
+ # wait for the windowmanger
+ #This will make the session wait on the WM to exit.
if [ x$STARTUP_STYLE != xmythvantage ]
then
- $WM
+ wait $pid
fi
fi