source: ipk/source/system_tun_0_1/CONTROL/preinst@ 653

Last change on this file since 653 was 521, checked in by civer, 16 years ago

-added all latest ipk sources

File size: 922 bytes
Line 
1#!/bin/sh
2#
3TMP=/tmp/.tun
4echo "syncing disk"
5sync
6if [ -e /lib/modules/tun.ko ]; then
7 echo --------------------------
8 echo tun.ko allready installed !!
9 echo --------------------------
10 exit 1
11fi
12if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
13 SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
14 FREE=`expr $SPACE - 100`
15 SIZE=12
16 echo "check freespace"
17 echo packege size $SIZE kb
18 echo freespace size $FREE kb
19 if [ "$FREE" -lt "$SIZE" ]; then
20 echo "sorry no freespace on device"
21 exit 1
22 else
23 echo ok
24 fi
25fi
26echo "install tun.ko ..."
27echo "checking OS"
28if [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then
29 echo ---------------------------
30 echo DONT USE this IPK Package!!
31 echo ---
32 echo Only for AAF Image!!
33 echo ---------------------------
34 exit 1
35fi
36exit 0
Note: See TracBrowser for help on using the repository browser.