source: ipk/source/players_mytube_1_0/CONTROL/preinst@ 4228

Last change on this file since 4228 was 4064, checked in by civer, 16 years ago

[IPK ]

  • added players-mytube
  • added swapplayers-MyTube

fixed some paths....

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