source: ipk/source.sh4/swapemus_oscam_6089/CONTROL/preinst@ 23306

Last change on this file since 23306 was 23306, checked in by nit, 13 years ago

fix

File size: 1.3 KB
Line 
1#!/bin/sh
2#
3TMP=/tmp/.oscam
4INSTDIR="$1"
5
6model=`cat /etc/model`
7echo""
8echo "Checking your Boxtype...."
9echo "Some Plugins will not work correctly on your $model!"
10echo ""
11if [ "$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
15else
16 echo "Boxtype: $model OK"
17fi
18
19echo "checking install path"
20if [ ! -d "$INSTDIR/bin/" ]; then
21 echo "--------------------------"
22 echo "no install path found...."
23 echo "--------------------------"
24 exit 1
25fi
26echo "install path found...."
27
28sed s#_path_#"$INSTDIR"#g -i "$INSTDIR/etc/oscam_6089_swap.emu"
29
30if [ "/var/swap" == "$INSTDIR" ]; then
31 echo "syncing disk"
32 sync
33else
34 SPACE=`getfreespace "$INSTDIR"`
35 FREE=`expr $SPACE - 100`
36 SIZE=936
37 echo "checking freespace"
38 echo packege size $SIZE kb
39 echo freespace size $FREE kb
40 if [ "$FREE" -lt "$SIZE" ]; then
41 echo "sorry no freespace left on device"
42 exit 1
43 else
44 echo ok
45 fi
46fi
47
48buildgroup=`cat /etc/.buildgroup`
49echo "checking OS"
50if [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then
51 echo ---------------------------
52 echo DONT USE this TPK Package!!
53 echo ---
54 echo Only for $buildgroup Image!!
55 echo ---------------------------
56 exit 1
57fi
58echo "installing Oscam Build 6089..."
59
60exit 0
Note: See TracBrowser for help on using the repository browser.