source: ipk/source.sh4/emus_oscam_6578/CONTROL/preinst@ 15059

Last change on this file since 15059 was 15059, checked in by speedy1, 14 years ago

[ipk] add new Oscam_6578

File size: 1.1 KB
Line 
1#!/bin/sh
2#
3TMP=/tmp/.keys
4
5model=`cat /etc/model`
6echo""
7echo "Checking your Boxtype...."
8echo ""
9if [ "$model" = "" ]; then
10 echo "Sorry! This Plugin is not available for your $model because it will not work correctly!!!"
11 echo "Aborting installation..."
12 exit 1
13else
14 echo "Boxtype: $model OK"
15fi
16
17if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ]; then
18 SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
19 FREE=`expr $SPACE - 100`
20 SIZE=930
21 echo "checking freespace"
22 echo packege size $SIZE kb
23 echo freespace size $FREE kb
24 if [ "$FREE" -lt "$SIZE" ]; then
25 echo "sorry no freespace left on device"
26 exit 1
27 else
28 echo ok
29 fi
30else
31 echo "syncing disk"
32 sync
33fi
34
35buildgroup=`cat /etc/.buildgroup`
36echo "checking OS"
37if [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then
38 echo ---------------------------
39 echo DONT USE this IPK Package!!
40 echo ---
41 echo Only for $buildgroup Image!!
42 echo ---------------------------
43 exit 1
44fi
45
46echo "installing Oscam 6578 & configs..."
47
48exit 0
Note: See TracBrowser for help on using the repository browser.