source: ipk/source/settings_default_1_2/CONTROL/preinst@ 521

Last change on this file since 521 was 521, checked in by civer, 16 years ago

-added all latest ipk sources

File size: 2.1 KB
Line 
1#!/bin/sh
2#
3TMP=/tmp/.set
4echo "syncing disk"
5sync
6#lamedb 218
7#sattelites 50
8#rest 22
9if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
10 SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
11 FREE=`expr $SPACE - 100`
12 SIZE=345
13 MIN=10
14 echo "check freespace"
15 if [ -e /var/usr/local/share/enigma2/lamedb ]; then
16 echo skipped lamdb allready installed
17 du /var/usr/local/share/enigma2/lamedb > /tmp/.sub
18 SUB=`cat /tmp/.sub | cut -d / -f1 | sed 's/ \+/ /g'`
19 MIN=`expr $MIN + $SUB`
20 fi
21 if [ -e /var/usr/local/share/enigma2/satellites.xml ]; then
22 echo skipped satellites.xml allready installed
23 du /var/usr/local/share/enigma2/satellites.xml > /tmp/.sub
24 SUB=`cat /tmp/.sub | cut -d / -f1 | sed 's/ \+/ /g'`
25 MIN=`expr $MIN + $SUB`
26 fi
27 echo packege size $SIZE kb
28 echo package skiped $MIN kb
29 SIZEEND=`expr $SIZE - $MIN`
30 echo package install $SIZEEND kb
31 echo freespace size $FREE kb
32 if [ "$FREE" -lt "$SIZEEND" ]; then
33 echo "sorry no freespace on device"
34 exit 1
35 else
36 echo ok
37 fi
38fi
39echo "install settings ..."
40echo "checking OS"
41if [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then
42 echo ---------------------------
43 echo DONT USE this IPK Package!!
44 echo ---
45 echo Only for AAF Image!!
46 echo ---------------------------
47 exit 1
48fi
49if [ -e /var/usr/local/share/enigma2/settings_installed ]; then
50 TYPE=`cat /var/usr/local/share/enigma2/settings_installed`
51 echo -----------------------------------
52 echo ""
53 echo remove $TYPE Settings first !!
54 echo ""
55 echo -----------------------------------
56
57 exit 1
58fi
59echo "remove /var/usr/local/share/enigma2/*.tv"
60rm -rf /var/usr/local/share/enigma2/*.tv
61echo "remove /var/usr/local/share/enigma2/*.radio"
62rm -rf /var/usr/local/share/enigma2/*.radio
63echo "remove /var/usr/local/share/enigma2/satellites.xml"
64rm -rf /var/usr/local/share/enigma2/satellites.xml
65echo "remove /var/usr/local/share/enigma2/lamedb"
66rm -rf /var/usr/local/share/enigma2/lamedb
67echo "remove /var/usr/local/share/enigma2/userbouquet.*"
68rm -rf /var/usr/local/share/enigma2/userbouquet.*
69
70exit 0
Note: See TracBrowser for help on using the repository browser.