source: ipk/source.sh4/titankeymaps_neutrino/CONTROL/preinst@ 17198

Last change on this file since 17198 was 12781, checked in by obi, 14 years ago

[ipk] update all swap/titan flash ipks

File size: 1.3 KB
RevLine 
[10168]1#!/bin/sh
2#
3TMP=/tmp/.bootlogos
4
5model=`cat /etc/model`
6echo""
[12551]7echo "Überprüfe Boxtype...."
8echo "Manche Plugins funktionieren nicht auf ihrer $model!"
[10168]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
[12395]18if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ]; then
19 SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
[10168]20 FREE=`expr $SPACE - 100`
[12781]21 SIZE=20
22 echo "checking freespace"
[10168]23 echo packege size $SIZE kb
24 echo freespace size $FREE kb
25 if [ "$FREE" -lt "$SIZE" ]; then
[12781]26 echo "sorry no freespace left on device"
[10168]27 exit 1
28 else
[12781]29 echo ok
[10168]30 fi
[12781]31else
32 echo "syncing disk"
33 sync
[10168]34fi
[11782]35buildgroup=`cat /etc/.buildgroup`
[12551]36echo "Überprüfe Betriebssystem..."
[11782]37if [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then
38 echo ---------------------------
39 echo DONT USE this IPK Package!!
40 echo ---
41 echo Only for $buildgroup Image!!
42 echo ---------------------------
43 exit 1
44fi
[10168]45
[12551]46echo "installiere keymap ..."
[11448]47
[12551]48 echo "Sichere rcmap -> rcmap_original"
[10168]49 mv /var/etc/titan/rcmap /var/etc/titan/rcmap_original
50
51exit 0
Note: See TracBrowser for help on using the repository browser.