| 1 | #!/bin/sh
|
|---|
| 2 | #
|
|---|
| 3 | TMP=/tmp/.picon
|
|---|
| 4 | echo "syncing disk"
|
|---|
| 5 | sync
|
|---|
| 6 |
|
|---|
| 7 | model=`cat /etc/model`
|
|---|
| 8 | echo""
|
|---|
| 9 | echo "Checking your Boxtype...."
|
|---|
| 10 | echo "Some Plugins will not work correctly on your $model!"
|
|---|
| 11 | echo ""
|
|---|
| 12 | if [ "$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
|
|---|
| 16 | else
|
|---|
| 17 | echo "Boxtype: $model OK"
|
|---|
| 18 | fi
|
|---|
| 19 |
|
|---|
| 20 | if [ -e /etc/.fullusb ] || [ -e /etc/.usbimage ]; then
|
|---|
| 21 | echo "detected USB Image...."
|
|---|
| 22 | echo "ok..."
|
|---|
| 23 | elif [ "$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
|
|---|
| 47 | else
|
|---|
| 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
|
|---|
| 56 | fi
|
|---|
| 57 |
|
|---|
| 58 | echo "installing hd picons for Astra 23.5..."
|
|---|
| 59 | buildgroup=`cat /etc/.buildgroup`
|
|---|
| 60 | echo "checking OS"
|
|---|
| 61 | if [ `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
|
|---|
| 68 | fi
|
|---|
| 69 | exit 0
|
|---|