source: ipk/source.sh4/titantools_scriptexec/CONTROL/preinst@ 20053

Last change on this file since 20053 was 15373, checked in by obi, 14 years ago

[ipk] add titan scriptexec

  • Property svn:executable set to *
File size: 1.2 KB
RevLine 
[15373]1#!/bin/sh
2#
3TMP=/tmp/.infos
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
18echo "install scriptexec Plugin ..."
19if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ]; then
20 SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
21 FREE=`expr $SPACE - 100`
22 SIZE=15
23 echo "checking freespace"
24 echo packege size $SIZE kb
25 echo freespace size $FREE kb
26 if [ "$FREE" -lt "$SIZE" ]; then
27 echo "sorry no freespace left on device"
28 exit 1
29 else
30 echo ok
31 fi
32else
33 echo "syncing disk"
34 sync
35fi
36buildgroup=`cat /etc/.buildgroup`
37echo "checking OS"
38if [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then
39 echo ---------------------------
40 echo DONT USE this IPK Package!!
41 echo ---
42 echo Only for $buildgroup Image!!
43 echo ---------------------------
44 exit 1
45fi
46
47exit 0
Note: See TracBrowser for help on using the repository browser.