source: ipk/source.sh4/swapnetwork_wlan_300/CONTROL/preinst@ 9897

Last change on this file since 9897 was 7451, checked in by BPanther, 15 years ago

[ipk] - copy source->source.sh4

  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#!/bin/sh
2#
3TMP=/tmp/.wlan
4echo "syncing disk"
5sync
6
7model=`cat /etc/model`
8linuxver=`uname -a`; linuxver=${linuxver#*_}; linuxver=${linuxver%_*}
9
10echo""
11echo "Checking your Boxtype...."
12echo "Some Plugins will not work correctly on your $model!"
13echo ""
14if [ "$linuxver" = "stm22" ] ; then
15 echo "Linux Version: $linuxver OK"
16else
17 echo "Sorry! This Plugin is not for your $model with ($linuxver)!!! It will not work correctly!!!"
18 echo "Aborting installation..."
19 exit 1
20fi
21
22if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
23 SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
24 FREE=`expr $SPACE - 100`
25 SIZE=56
26 echo "checking freespace..."
27 echo packege size $SIZE kb
28 echo freespace size $FREE kb
29 if [ "$FREE" -lt "$SIZE" ]; then
30 echo "sorry no freespace left on device!"
31 exit 1
32 else
33 echo ok
34 fi
35
36 echo "checking swapstick..."
37 if [ ! -d /var/swap/bin/ ]; then
38 echo "no swapstick found!"
39 exit 1
40 fi
41 echo "swapstick found!"
42fi
43
44echo "checking OS"
45if [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then
46 echo ---------------------------
47 echo DONT USE this IPK Package!!
48 echo ---
49 echo Only for AAF Image!!
50 echo ---------------------------
51 exit 1
52fi
53echo "installing wireless plugin ..." sync
54exit 0
Note: See TracBrowser for help on using the repository browser.