source: ipk/source.sh4/lcdsamsungskins_channel_2/CONTROL/preinst@ 23397

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

[titan] SAMSUNG-LCD-SKIN - add Skin#2

File size: 1.7 KB
Line 
1#!/bin/sh
2#
3TMP=/tmp/.TOOLS
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 lcdsamsung installation"
19if [ ! -d /var/swap/titanplugins/lcdsamsung ]; then
20 echo "--------------------------"
21 echo "Keine lcdsamsung Installation gefunden! Bitte erst das lcdsamsung Plugin installieren!"
22 echo "--------------------------"
23 exit 1
24fi
25echo "lcdsamsung Installation ok...."
26
27link=`readlink /var/swap`
28if [ -z $link ]; then
29 link="kein link"
30fi
31
32if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
33 SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
34 FREE=`expr $SPACE - 100`
35 SIZE=1000
36 echo "checking freespace"
37 echo packege size $SIZE kb
38 echo freespace size $FREE kb
39 if [ "$FREE" -lt "$SIZE" ]; then
40 echo "sorry no freespace left on device"
41 exit 1
42 else
43 echo ok
44 fi
45else
46 echo "syncing disk"
47 sync
48fi
49buildgroup=`cat /etc/.buildgroup`
50echo "checking OS"
51if [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then
52 echo ---------------------------
53 echo DONT USE this IPK Package!!
54 echo ---
55 echo Only for $buildgroup Image!!
56 echo ---------------------------
57 exit 1
58fi
59
60mv /var/swap/titanplugins/lcdsamsung/skin.xml /var/swap/titanplugins/lcdsamsung/originalskin.xml
61echo "Sichere Originalskin....."
62
63echo "Installiere Samsung LCD Skin..."
64
65exit 0
Note: See TracBrowser for help on using the repository browser.