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

Last change on this file since 18688 was 18688, checked in by obi, 13 years ago

[ipk] fix settings

  • Property svn:executable set to *
File size: 1.7 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=508
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
48if [ -e /tmp/.ipkg_upgrade_start ];then
49 echo "ipkg upgrade skip settings"
50 exit 1
51fi
52
53#echo "remove /var/etc/titan/bouquets.*"
54#rm -rf /var/etc/titan/bouquets.* > /dev/null 2>&1
55#echo "remove /var/etc/titan/channel"
56#rm -rf /var/etc/titan/channel > /dev/null 2>&1
57#echo "remove /var/etc/titan/provider"
58#rm -rf /var/etc/titan/provider > /dev/null 2>&1
59#echo "remove /var/etc/titan/satellites"
60#rm -rf /var/etc/titan/satellites > /dev/null 2>&1
61#echo "remove /var/etc/titan/transponder"
62#rm -rf /var/etc/titan/transponder > /dev/null 2>&1
63cp /var/etc/titan/bouquets.cfg /tmp/bouquets.cfg
64
65exit 0
Note: See TracBrowser for help on using the repository browser.