source: ipk/source/swapnetwork_wlan_300/CONTROL/preinst@ 6540

Last change on this file since 6540 was 6523, checked in by capt_bluebaer, 15 years ago

[ipk] Initial release, it's provided only for ufs910. if other 41-kernel-boxes should be supported, please edit the file preinst in the CONTROL dir for the corresponding box

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