| 1 | #!/bin/sh
|
|---|
| 2 | #
|
|---|
| 3 | TMP=/tmp/.set
|
|---|
| 4 |
|
|---|
| 5 | model=`cat /etc/model`
|
|---|
| 6 | echo""
|
|---|
| 7 | echo "Checking your Boxtype...."
|
|---|
| 8 | echo "Some Plugins will not work correctly on your $model!"
|
|---|
| 9 | echo ""
|
|---|
| 10 | if [ "$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
|
|---|
| 14 | else
|
|---|
| 15 | echo "Boxtype: $model OK"
|
|---|
| 16 | fi
|
|---|
| 17 |
|
|---|
| 18 | echo "installing settings ..."
|
|---|
| 19 | buildgroup=`cat /etc/.buildgroup`
|
|---|
| 20 | echo "checking OS"
|
|---|
| 21 | if [ `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
|
|---|
| 28 | fi
|
|---|
| 29 |
|
|---|
| 30 | if [ `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
|
|---|
| 43 | else
|
|---|
| 44 | echo "syncing disk"
|
|---|
| 45 | sync
|
|---|
| 46 | fi
|
|---|
| 47 |
|
|---|
| 48 | echo "remove /var/etc/titan/bouquets.*"
|
|---|
| 49 | rm -rf /var/etc/titan/bouquets.* > /dev/null 2>&1
|
|---|
| 50 | echo "remove /var/etc/titan/channel"
|
|---|
| 51 | rm -rf /var/etc/titan/channel > /dev/null 2>&1
|
|---|
| 52 | echo "remove /var/etc/titan/provider"
|
|---|
| 53 | rm -rf /var/etc/titan/provider > /dev/null 2>&1
|
|---|
| 54 | echo "remove /var/etc/titan/satellites"
|
|---|
| 55 | rm -rf /var/etc/titan/satellites > /dev/null 2>&1
|
|---|
| 56 | echo "remove /var/etc/titan/transponder"
|
|---|
| 57 | rm -rf /var/etc/titan/transponder > /dev/null 2>&1
|
|---|
| 58 |
|
|---|
| 59 | exit 0
|
|---|