summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/LinHES-system/LinHES-run
blob: 2322b3b3be50d192a4cf3fdc69869a25729e9850 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/bin/sh
. /etc/profile
. /etc/systemconfig

#keylaunch &
#/usr/bin/tilda &

#move mouse to corner
xdotool mousemove -10 -10
/usr/X11R6/bin/unclutter -root -idle 5 -jitter 5 -noevents  &
if [ x"$Screensavertype" = "xgscreensaver" ]
then
    gnome-screensaver &
elif  [ x"$Screensavertype" = "xxscreensaver" ]
then
    xscreensaver  -no-splash &
fi

/usr/bin/xvattr -a XV_COLORKEY -v 0
mtd &
#/usr/bin/nvidia-settings -l
#/usr/bin/nvidia-settings -a InitialPixmapPlacement=2

if [ x$ShowTips = "x1" ]
then
    echo "Alt+h for help"  | osd_cat --font="-adobe-helvetica-bold-*-*-*-34-*-*-*-*-*-*-*" --shadow=3 --pos=middle --align=centre --offset=200 --color=yellow --delay=5 &
fi

# Run any scripting that applies to special hardware.  These brand-specific commands that run
# after Tweaker will, of course, override generic or hardware-specific settings.
SpecialHardwareCommands() {
    special_hardware_file=/myth/.special_hardware_type
    special_hardware=`cat $special_hardware_file`

    case $special_hardware in
	dragon*)
	    sudo -E twk_audio.pl --implement digital
	    sudo -E twk_dragon.pl --implement all
	    ;;
	ausdragon*)
	    ;;
	*)
	    # there are no brand-specific commands for configuring whatever
	    # special hardware the user chose
	    ;;
    esac
}

if [ !  $SystemType = "Frontend_only" ]
then
    if [  -f ~/.configure ]
    then
	# Run Tweaker, which applies generic and hardware-specific settings
	if [ ! -f ~/.no_meth ]
	then
            sudo -E tweaker.pl
            /bin/rm /tmp/fps # ??? clean up a temp file that will eventually be obsolete anyway
            # Run any brand-specific commands, if necessary.
            SpecialHardwareCommands
        else
	    rm -f ~/.no_meth
	fi
	sudo pacman -R myth2ipod myt2xvid3
	sudo pacman -S --noconfirm myth2ipod myt2xvid3
        sudo sv stop mythbackend
	cat /data/database/dvd_transcode_r6.sql | mysql -u root mythconverg
        xterm -fn *18* -e sudo taskset -c 0 /usr/bin/mythtv-setup
        sudo sv start mythbackend
	sudo chown -R mythtv.mythtv /home/mythtv
        nice -n 19 mythfilldatabase --quiet &
        rm ~/.configure
    fi
fi


if [ x"$UseMythWelcome" = "x1" ]
then
    STARTCMD="/usr/bin/mythwelcome"
else
    STARTCMD="/usr/bin/mythfrontend -d -l /var/log/mythtv/mythfrontend.log"
fi

echo "====================================================================="
echo "Starting $STARTCMD"
firstboot.sh &

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
    else
        killall -9 irexec
        /usr/bin/irexec -d
        $STARTCMD 2>&1
    fi
fi