source: ipk/source.sh4/lcdsamsungskins_PICONS_320x240/CONTROL/preinst@ 23060

Last change on this file since 23060 was 23060, checked in by channel, 13 years ago

[titan] update SWAPPICONS preinst filesize

File size: 1.5 KB
Line 
1#!/bin/sh
2#
3TMP=/tmp/.picon
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 "checking swapstick"
19if [ ! -d /var/swap/bin/ ]; then
20 echo "--------------------------"
21 echo "no swapstick found...."
22 echo "--------------------------"
23 exit 1
24fi
25echo "swapstick found...."
26link=`readlink /var/swap`
27if [ -z $link ]; then
28 link="kein link"
29fi
30if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
31 SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
32 FREE=`expr $SPACE - 100`
33 SIZE=16300
34 echo "checking freespace"
35 echo packege size $SIZE kb
36 echo freespace size $FREE kb
37 if [ "$FREE" -lt "$SIZE" ]; then
38 echo "sorry no freespace left on device"
39 exit 1
40 else
41 echo ok
42 fi
43else
44 echo "syncing disk"
45 sync
46fi
47buildgroup=`cat /etc/.buildgroup`
48echo "checking OS"
49if [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then
50 echo ---------------------------
51 echo DONT USE this IPK Package!!
52 echo ---
53 echo Only for $buildgroup Image!!
54 echo ---------------------------
55 exit 1
56fi
57
58echo "installing swap Alternate Picons 320x240 for Titan..."
59
60
61exit 0
Note: See TracBrowser for help on using the repository browser.