source: ipk/source.sh4/titanplayersbackup_mc/CONTROL/preinst @ 13505

Last change on this file since 13505 was 13505, checked in by obi, 12 years ago

fix

File size: 919 bytes
Line 
1#!/bin/sh
2#
3TMP=/tmp/.tmp
4
5model=`cat /etc/model`
6echo""
7echo "Checking your Boxtype...."
8echo "Some Plugins will not work correctly on your $model!"
9echo ""
10if [ "$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
14else
15        echo "Boxtype: $model OK"
16fi
17
18if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ]; then
19        SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
20        FREE=`expr $SPACE - 100`
21        SIZE=1200
22        echo "checking freespace"
23        echo packege size $SIZE kb
24        echo freespace size $FREE kb
25        if  [ "$FREE" -lt "$SIZE" ]; then
26                echo "sorry no freespace left on device"
27                exit 1
28        else
29                echo ok         
30        fi
31else
32        echo "syncing disk"
33        sync
34fi 
35echo "installing AAF MediaCenter ..."
36
37
38rm -r /var/usr/local/share/titan/plugins/mc
39exit 0
Note: See TracBrowser for help on using the repository browser.