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

Last change on this file since 23298 was 23298, checked in by nit, 13 years ago
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
28if [ "/var/swap" == "$INSTDIR" ]; then
29 echo "syncing disk"
30 sync
31else
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
44fi
45
46buildgroup=`cat /etc/.buildgroup`
47echo "checking OS"
48if [ `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
55fi
56echo "installing Oscam Build 6089..."
57
58exit 0
Note: See TracBrowser for help on using the repository browser.