Ignore:
Timestamp:
Sep 10, 2013, 7:28:16 PM (13 years ago)
Author:
nit
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ipk/source/skins_MetrixHD/CONTROL/preinst

    r20914 r23640  
    11#!/bin/sh
    2 TMP=/tmp/.titanskin
    3 
    4 
    5 echo "syncing disk"
    6 sync
    7 
    8 model=`cat /etc/model`
    9 echo""
    10 echo "Checking your Boxtype...."
    11 echo "Some Plugins will not work correctly on your $model!"
    12 echo ""
    13 if [ "$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
    17 else
    18         echo "Boxtype: $model OK"
    19 fi
    20 
    21 echo "checking swapstick"
    22 if [ ! -d /var/swap/titanskins/ ]; then
    23   echo "--------------------------"
    24         echo "no swapstick found...."
    25         echo "--------------------------"
    26         exit 1
    27 fi
    28 echo "swapstick found...."
    29 link=`readlink /var/swap`
    30 if [ `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
    43 else
    44         echo "syncing disk"
    45         sync
    46 fi
    47 
    48 buildgroup=`cat /etc/.buildgroup`
    49 echo "checking OS"       
    50 if  [ `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
    57 fi
    58 
    59 rm -rf /var/swap/titanskins/MetrixHD
    60 
    61 echo "installing MetrixHD skin to swapstick..."
    622
    633exit 0
Note: See TracChangeset for help on using the changeset viewer.