1 | if [ -L /mnt ];then |
---|
2 | mv -f /mnt /mnt_old |
---|
3 | cp -a /etc/titan.restore/mnt / |
---|
4 | fi |
---|
5 | |
---|
6 | date |
---|
7 | echo npdate |
---|
8 | ntpdate -b ptbtime1.ptb.de & |
---|
9 | #sleep 5 |
---|
10 | |
---|
11 | echo "####################################" |
---|
12 | date |
---|
13 | echo "####################################" |
---|
14 | |
---|
15 | if [ -e /proc/stb/info/boxtype ]; then |
---|
16 | stbcheck=`cat /proc/stb/info/boxtype` |
---|
17 | if [ $stbcheck == "sf8008" ] || [ $stbcheck == "ustym4kpro" ] || [ $stbcheck == "cc1" ]; then |
---|
18 | count=`ps -ef |grep libreader |grep -v "grep" |wc -l` |
---|
19 | if [ 0 == $count ];then |
---|
20 | libreader 720P_50 |
---|
21 | fi |
---|
22 | fi |
---|
23 | fi |
---|
24 | |
---|
25 | if [ -x /usr/bin/showiframe ]; then |
---|
26 | if [ -e /proc/stb/info/boxtype ]; then |
---|
27 | stbcheck=`cat /proc/stb/info/boxtype | cut -c1-2` |
---|
28 | if [ ! $stbcheck == "u5" ]; then |
---|
29 | killall -9 showiframe; sleep 1 |
---|
30 | fi |
---|
31 | else |
---|
32 | killall -9 showiframe; sleep 1 |
---|
33 | fi |
---|
34 | if [ -f /etc/enigma2/backdrop.mvi ]; then |
---|
35 | /usr/bin/showiframe /etc/enigma2/backdrop.mvi |
---|
36 | elif [ -f /usr/share/backdrop.mvi ]; then |
---|
37 | /usr/bin/showiframe /usr/share/backdrop.mvi |
---|
38 | fi |
---|
39 | fi |
---|
40 | |
---|
41 | # in case sysctl.conf is not properly loaded - load sysctl.conf here again... |
---|
42 | sysctl -p |
---|
43 | |
---|
44 | #sleep 5 |
---|
45 | /usr/local/bin/titan /mnt/config/titan.cfg |
---|
46 | |
---|
47 | ret=$?# enigma2 exit codes: |
---|
48 | # |
---|
49 | # 1 - halt |
---|
50 | # 2 - reboot |
---|
51 | # 3 - restart enigma |
---|
52 | # |
---|
53 | # >128 signal |
---|
54 | |
---|
55 | ret=$? |
---|
56 | |
---|
57 | if [ "$ret" -ne "1" ]; then |
---|
58 | if [ -e /proc/stb/info/boxtype ]; then |
---|
59 | stbcheck=`cat /proc/stb/info/boxtype | cut -c1-2` |
---|
60 | if [ $stbcheck == "u5" ]; then |
---|
61 | killall -9 showiframe; sleep 5 |
---|
62 | fi |
---|
63 | stbcheck=`cat /proc/stb/info/boxtype` |
---|
64 | if [ $stbcheck == "sf8008" ] || [ $stbcheck == "ustym4kpro" ] || [ $stbcheck == "cc1" ] ; then |
---|
65 | killall -9 libreader; sleep 5 |
---|
66 | fi |
---|
67 | fi |
---|
68 | fi |
---|
69 | |
---|
70 | case $ret in |
---|
71 | 1) |
---|
72 | /sbin/halt |
---|
73 | ;; |
---|
74 | 2) |
---|
75 | if [ -f /proc/stb/fp/force_restart ]; then |
---|
76 | echo 1 > /proc/stb/fp/force_restart |
---|
77 | fi |
---|
78 | /sbin/reboot |
---|
79 | ;; |
---|
80 | 3) |
---|
81 | rm -fR /home/root/.gstreamer-0.10 |
---|
82 | rm -f /tmp/.listen.camd.socket.ignore |
---|
83 | ;; |
---|
84 | 4) |
---|
85 | /sbin/rmmod lcd |
---|
86 | /usr/sbin/fpupgrade --upgrade 2>&1 | tee /home/root/fpupgrade.log |
---|
87 | sleep 1; |
---|
88 | /sbin/rmmod fp |
---|
89 | /sbin/modprobe fp |
---|
90 | /sbin/reboot |
---|
91 | ;; |
---|
92 | 16) |
---|
93 | echo "rescue" > /proc/stb/fp/boot_mode |
---|
94 | /sbin/reboot |
---|
95 | ;; |
---|
96 | 42) |
---|
97 | python /usr/lib/enigma2/python/upgrade.pyo |
---|
98 | ;; |
---|
99 | 43) |
---|
100 | init 1 |
---|
101 | ;; |
---|
102 | 44) |
---|
103 | # little hack but it will be fixed soon in drivers |
---|
104 | /usr/lib/enigma2/python/Plugins/SystemPlugins/MICOMUpgrade/bin/fbclear |
---|
105 | /usr/bin/showiframe /usr/lib/enigma2/python/Plugins/SystemPlugins/MICOMUpgrade/wait.mvi |
---|
106 | echo fpupload >/proc/vfd && sleep 3 && dd bs=256k if=/tmp/micom.bin of=/dev/mcu |
---|
107 | /usr/bin/showiframe /usr/lib/enigma2/python/Plugins/SystemPlugins/MICOMUpgrade/reboot.mvi |
---|
108 | # Wait forever for the user to power off |
---|
109 | while(true) ; do sleep 60 ; done |
---|
110 | ;; |
---|
111 | 45) |
---|
112 | echo " " > /dev/lcd0 |
---|
113 | /usr/bin/gigablue_wol |
---|
114 | ;; |
---|
115 | *) |
---|
116 | rm -f /tmp/.listen.camd.socket.ignore |
---|
117 | ;; |
---|
118 | |
---|