source: ipk/source/picons_HD_astra_23.5/CONTROL/preinst@ 17543

Last change on this file since 17543 was 11794, checked in by madie, 14 years ago

[ipk] add buildgroup check

File size: 2.1 KB
RevLine 
[7451]1#!/bin/sh
2#
3TMP=/tmp/.picon
4echo "syncing disk"
5sync
6
7model=`cat /etc/model`
8echo""
9echo "Checking your Boxtype...."
10echo "Some Plugins will not work correctly on your $model!"
11echo ""
12if [ "$model" = "" ]; then
13 echo "Sorry! This Plugin is not available for your $model because it will not work correctly!!!"
14 echo "Aborting installation..."
15 exit 1
16else
17 echo "Boxtype: $model OK"
18fi
19
20if [ -e /etc/.fullusb ] || [ -e /etc/.usbimage ]; then
21 echo "detected USB Image...."
22 echo "ok..."
23elif [ "$model" = "ufs912" ] || [ "$model" = "at7000" ] || [ "$model" = "at700" ]; then
24 echo "detected Boxtype : $model...."
25 echo "ok..."
26 if [ `ls -la /var/usr/local/share/enigma2 | grep "/var/swap/picon" | wc -l` -ge 1 ]; then
27 echo "check ok...installing to swap...."
28 else
29 if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
30 SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
31 FREE=`expr $SPACE - 100`
32 SIZE=4150
33 echo "checking freespace in flash"
34 echo packege size $SIZE kb
35 echo freespace size $FREE kb
36 if [ "$FREE" -lt "$SIZE" ]; then
37 echo "sorry no freespace left on device"
38 echo "ERROR: this package will not fit in your flash..."
39 echo "...you need a swapstick to install the package on your $model...!"
40 echo "aborting installation..."
41 exit 1
42 else
43 echo freespace ok
44 fi
45 fi
46 fi
47else
48 if [ `ls -la /var/usr/local/share/enigma2 | grep "/var/swap/picon" | wc -l` -ge 1 ]; then
49 echo "check ok...installing to swapstick...."
50 else
51 echo "ERROR: this package will not fit in your flash..."
52 echo "...you need a swapstick to install the package on your $model...!"
53 echo "aborting installation..."
54 exit 1
55 fi
56fi
57
58echo "installing hd picons for Astra 23.5..."
[11794]59buildgroup=`cat /etc/.buildgroup`
60echo "checking OS"
61if [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then
62 echo ---------------------------
63 echo DONT USE this IPK Package!!
64 echo ---
65 echo Only for $buildgroup Image!!
66 echo ---------------------------
67 exit 1
[7451]68fi
69exit 0
Note: See TracBrowser for help on using the repository browser.