source: ipk/source.sh4/titansettings_default_sat_1_0/CONTROL/preinst@ 17806

Last change on this file since 17806 was 17806, checked in by andy-1, 14 years ago

fix

File size: 1.6 KB
Line 
1#!/bin/sh
2#
3TMP=/tmp/.set
4
5model=`cat /etc/model`
6echo""
7echo "Checking your Boxtype...."
8echo "Some Plugins will not work correctly on your $model!"
9echo ""
10if [ "$model" = "" ]; then
11 echo "Sorry! This Plugin is not available for your $model because it will not work correctly!!!"
12 echo "Aborting installation..."
13 exit 1
14else
15 echo "Boxtype: $model OK"
16fi
17
18echo "installing settings ..."
19buildgroup=`cat /etc/.buildgroup`
20echo "checking OS"
21if [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then
22 echo ---------------------------
23 echo DONT USE this IPK Package!!
24 echo ---
25 echo Only for $buildgroup Image!!
26 echo ---------------------------
27 exit 1
28fi
29
30if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ]; then
31 SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
32 FREE=`expr $SPACE - 100`
33 SIZE=270
34 echo "checking freespace"
35 echo packege size $SIZE kb
36 echo freespace size $FREE kb
37 if [ "$FREE" -lt "$SIZE" ]; then
38 echo "sorry no freespace left on device"
39 exit 1
40 else
41 echo ok
42 fi
43else
44 echo "syncing disk"
45 sync
46fi
47
48echo "remove /var/etc/titan/bouquets.*"
49rm -rf /var/etc/titan/bouquets.* > /dev/null 2>&1
50echo "remove /var/etc/titan/channel"
51rm -rf /var/etc/titan/channel > /dev/null 2>&1
52echo "remove /var/etc/titan/provider"
53rm -rf /var/etc/titan/provider > /dev/null 2>&1
54echo "remove /var/etc/titan/satellites"
55rm -rf /var/etc/titan/satellites > /dev/null 2>&1
56echo "remove /var/etc/titan/transponder"
57rm -rf /var/etc/titan/transponder > /dev/null 2>&1
58
59exit 0
Note: See TracBrowser for help on using the repository browser.