| 1 | #!/bin/sh
|
|---|
| 2 | #
|
|---|
| 3 | TMP=/tmp/.oscam
|
|---|
| 4 | INSTDIR="$1"
|
|---|
| 5 |
|
|---|
| 6 | model=`cat /etc/model`
|
|---|
| 7 | echo""
|
|---|
| 8 | echo "Checking your Boxtype...."
|
|---|
| 9 | echo "Some Plugins will not work correctly on your $model!"
|
|---|
| 10 | echo ""
|
|---|
| 11 | if [ "$model" = "" ]; then
|
|---|
| 12 | echo "Sorry! This Plugin is not available for your $model because it will not work correctly!!!"
|
|---|
| 13 | echo "Aborting installation..."
|
|---|
| 14 | exit 1
|
|---|
| 15 | else
|
|---|
| 16 | echo "Boxtype: $model OK"
|
|---|
| 17 | fi
|
|---|
| 18 |
|
|---|
| 19 | echo "checking install path"
|
|---|
| 20 | if [ ! -d "$INSTDIR/bin/" ]; then
|
|---|
| 21 | echo "--------------------------"
|
|---|
| 22 | echo "no install path found...."
|
|---|
| 23 | echo "--------------------------"
|
|---|
| 24 | exit 1
|
|---|
| 25 | fi
|
|---|
| 26 | echo "install path found...."
|
|---|
| 27 |
|
|---|
| 28 | if [ "/var/swap" == "$INSTDIR" ]; then
|
|---|
| 29 | echo "syncing disk"
|
|---|
| 30 | sync
|
|---|
| 31 | else
|
|---|
| 32 | SPACE=`getfreespace "$INSTDIR"`
|
|---|
| 33 | FREE=`expr $SPACE - 100`
|
|---|
| 34 | SIZE=936
|
|---|
| 35 | echo "checking freespace"
|
|---|
| 36 | echo packege size $SIZE kb
|
|---|
| 37 | echo freespace size $FREE kb
|
|---|
| 38 | if [ "$FREE" -lt "$SIZE" ]; then
|
|---|
| 39 | echo "sorry no freespace left on device"
|
|---|
| 40 | exit 1
|
|---|
| 41 | else
|
|---|
| 42 | echo ok
|
|---|
| 43 | fi
|
|---|
| 44 | fi
|
|---|
| 45 |
|
|---|
| 46 | buildgroup=`cat /etc/.buildgroup`
|
|---|
| 47 | echo "checking OS"
|
|---|
| 48 | if [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then
|
|---|
| 49 | echo ---------------------------
|
|---|
| 50 | echo DONT USE this TPK Package!!
|
|---|
| 51 | echo ---
|
|---|
| 52 | echo Only for $buildgroup Image!!
|
|---|
| 53 | echo ---------------------------
|
|---|
| 54 | exit 1
|
|---|
| 55 | fi
|
|---|
| 56 | echo "installing Oscam Build 6089..."
|
|---|
| 57 |
|
|---|
| 58 | exit 0
|
|---|