source: ipk/source/skins_MetrixHD/CONTROL/preinst@ 23602

Last change on this file since 23602 was 20914, checked in by tobayer, 13 years ago

[titan] new MetrixHD skin

File size: 1.5 KB
Line 
1#!/bin/sh
2TMP=/tmp/.titanskin
3
4
5echo "syncing disk"
6sync
7
8model=`cat /etc/model`
9echo""
10echo "Checking your Boxtype...."
11echo "Some Plugins will not work correctly on your $model!"
12echo ""
13if [ "$model" = "" ]; then
14 echo "Sorry! This Plugin is not available for your $model because it will not work correctly!!!"
15 echo "Aborting installation..."
16 exit 1
17else
18 echo "Boxtype: $model OK"
19fi
20
21echo "checking swapstick"
22if [ ! -d /var/swap/titanskins/ ]; then
23 echo "--------------------------"
24 echo "no swapstick found...."
25 echo "--------------------------"
26 exit 1
27fi
28echo "swapstick found...."
29link=`readlink /var/swap`
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=2000
34 echo "checking freespace"
35 echo package 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
47
48buildgroup=`cat /etc/.buildgroup`
49echo "checking OS"
50if [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then
51 echo ---------------------------
52 echo DONT USE this IPK Package!!
53 echo ---
54 echo Only for $buildgroup Image!!
55 echo ---------------------------
56 exit 1
57fi
58
59rm -rf /var/swap/titanskins/MetrixHD
60
61echo "installing MetrixHD skin to swapstick..."
62
63exit 0
Note: See TracBrowser for help on using the repository browser.