source: ipk/source.sh4/emus_gbox_773/CONTROL/preinst@ 14023

Last change on this file since 14023 was 12781, checked in by obi, 14 years ago

[ipk] update all swap/titan flash ipks

  • Property svn:executable set to *
File size: 1.6 KB
Line 
1#!/bin/sh
2#
3TMP=/tmp/.keys
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=500
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
31fi
32echo "installing gbox and configs..."
33if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ]; then
34 SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
35 FREE=`expr $SPACE - 100`
36 SIZE=1360
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
46else
47 echo "syncing disk"
48 sync
49fi
50buildgroup=`cat /etc/.buildgroup`
51echo "checking OS"
52if [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then
53 echo ---------------------------
54 echo DONT USE this IPK Package!!
55 echo ---
56 echo Only for $buildgroup Image!!
57 echo ---------------------------
58 exit 1
59fi
60
61exit 0
62
Note: See TracBrowser for help on using the repository browser.