source: ipk/source.sh4/picons_HD_astra19.2_1_0/CONTROL/preinst@ 7451

Last change on this file since 7451 was 7451, checked in by BPanther, 15 years ago

[ipk] - copy source->source.sh4

  • Property svn:executable set to *
File size: 2.0 KB
Line 
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 19.2..."
59echo "checking OS"
60if [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then
61 echo ---------------------------
62 echo DONT USE this IPK Package!!
63 echo ---
64 echo Only for AAF Image!!
65 echo ---------------------------
66 exit 1
67fi
68exit 0
Note: See TracBrowser for help on using the repository browser.