source: ipk/source.sh4/swapnetwork_wlan_400/CONTROL/preinst@ 17841

Last change on this file since 17841 was 12385, checked in by capt_bluebaer, 14 years ago
  • Property svn:executable set to *
File size: 1.5 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 ""
14
15if [ "$model" = "ufs912" ] ; then
16 echo "Your $model supports Wireless-Lan out-of-the-box"
17 echo "No plugin neccessary, aborting installation..."
18 exit 0
19fi
20
21if [ "$linuxver" = "stm24" ] ; then
22 echo "Linux Version: $linuxver OK"
23else
24 echo "Sorry! This Plugin is not for your $model with ($linuxver)!!! It will not work correctly!!!"
25 echo "Aborting installation..."
26 exit 1
27fi
28
29if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
30 SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
31 FREE=`expr $SPACE - 100`
32 SIZE=56
33 echo "checking freespace..."
34 echo packege size $SIZE kb
35 echo freespace size $FREE kb
36 if [ "$FREE" -lt "$SIZE" ]; then
37 echo "sorry no freespace left on device!"
38 exit 1
39 else
40 echo ok
41 fi
42
43 echo "checking swapstick..."
44 if [ ! -d /var/swap/bin/ ]; then
45 echo "no swapstick found!"
46 exit 1
47 fi
48 echo "swapstick found!"
49fi
50
51echo "checking OS"
52if [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then
53 echo ---------------------------
54 echo DONT USE this IPK Package!!
55 echo ---
56 echo Only for AAF Image!!
57 echo ---------------------------
58 exit 1
59fi
60echo "installing wireless plugin ..." sync
61exit 0
Note: See TracBrowser for help on using the repository browser.