enigma2.sh: Don't load libpassthrough
[openblackhole/openblackhole-enigma2.git] / tools / enigma2.sh.in
1 #!/bin/sh
2
3 prefix=@prefix@
4 exec_prefix=@exec_prefix@
5 datarootdir=@datarootdir@
6
7 if [ -x @bindir@/showiframe ]; then
8         if [ -f @sysconfdir@/enigma2/backdrop.mvi ]; then
9                 @bindir@/showiframe @sysconfdir@/enigma2/backdrop.mvi
10         elif [ -f @sysconfdir@/enigma2/bootlogo.mvi ]; then
11                 @bindir@/showiframe @sysconfdir@/enigma2/bootlogo.mvi
12         elif [ -f @datadir@/bootlogo.mvi ]; then
13                 @bindir@/showiframe @datadir@/bootlogo.mvi
14         fi
15 fi
16
17 # hook to execute scripts always before enigma2 start
18 if [ -x @bindir@/enigma2_pre_start.sh ]; then
19         @bindir@/enigma2_pre_start.sh
20 fi
21
22 if [ -d /home/root ]; then
23         cd /home/root
24 fi
25
26 LIBS=@libdir@/libopen.so.0.0.0
27
28 sync
29 LD_PRELOAD=$LIBS @bindir@/enigma2
30
31 # enigma2 exit codes:
32 #
33 # 1 - halt
34 # 2 - reboot
35 # 3 - restart enigma
36 #
37 # >128 signal
38
39 ret=$?
40 case $ret in
41         1)
42                 /sbin/halt
43                 ;;
44         2)
45                 /sbin/reboot
46                 ;;
47         3)
48                 rm -fR /home/root/.gstreamer-0.10
49                 ;;
50         4)
51                 /sbin/rmmod lcd
52                 /usr/sbin/fpupgrade --upgrade 2>&1 | tee /home/root/fpupgrade.log
53                 sleep 1;
54                 /sbin/rmmod fp
55                 /sbin/modprobe fp
56                 /sbin/reboot
57                 ;;
58         42)
59                 # bind the console (when available)
60                 [ -f /sys/class/vtconsole/vtcon1/bind ] && echo 1 > /sys/class/vtconsole/vtcon1/bind
61                 opkg upgrade 2>&1 | tee /home/root/ipkgupgrade.log
62                 /sbin/reboot
63                 ;;
64         *)
65                 ;;
66 esac