enigma2: use libpassthrough when available, push srcrev to fix radiomode
[openembedded.git] / recipes / enigma2 / enigma2 / enigma2.sh
1 #!/bin/sh
2
3 /usr/bin/showiframe /boot/backdrop.mvi
4
5 cd /home/root
6
7 if [ -f /usr/lib/libpassthrough.so ]
8         LD_PRELOAD="/usr/lib/libopen.so.0.0 /usr/lib/libpassthrough.so" /usr/bin/enigma2
9 else
10         LD_PRELOAD=/usr/lib/libopen.so.0.0 /usr/bin/enigma2
11 fi
12
13 # enigma2 exit codes:
14 #
15 # 0 - restart enigma
16 # 1 - halt
17 # 2 - reboot
18 #
19 # >128 signal
20
21 ret=$?
22 case $ret in
23         1)
24                 /sbin/halt
25                 ;;
26         2)
27                 /sbin/reboot
28                 ;;
29         4)
30                 /sbin/rmmod lcd
31                 /usr/sbin/fpupgrade --upgrade 2>&1 | tee /home/root/fpupgrade.log
32                 sleep 1;
33                 /sbin/rmmod fp
34                 /sbin/modprobe fp
35                 /sbin/reboot
36                 ;;
37         *)
38                 ;;
39 esac