Ignore:
Timestamp:
09/08/13 17:41:17 (11 years ago)
Author:
gost
Message:

[plugin] autotimer new tpk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ipk/source.sh4/titantools_autotimer/CONTROL/preinst

    r21232 r23446  
    22#
    33TMP=/tmp/.infos
    4 
    5 model=`cat /etc/model`
    6 echo""
    7 echo "Checking your Boxtype...."
    8 echo "Some Plugins will not work correctly on your $model!"
    9 echo ""
    10 if [ "$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
    14 else
    15         echo "Boxtype: $model OK"
    16 fi
    17 
    18 echo "install autotimer Plugin ..."
    19 if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ]; then
    20         SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
    21         FREE=`expr $SPACE - 100`
    22         SIZE=10
    23         echo "checking freespace"
    24         echo packege size $SIZE kb
    25         echo freespace size $FREE kb
    26         if  [ "$FREE" -lt "$SIZE" ]; then
    27                 echo "sorry no freespace left on device"
    28                 exit 1
    29         else
    30                 echo ok         
    31         fi
    32 else
    33         echo "syncing disk"
    34         sync
    35 fi
    36 buildgroup=`cat /etc/.buildgroup`
    37 echo "checking OS"       
    38 if  [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then               
    39         echo ---------------------------                 
    40         echo DONT USE this IPK Package!!                 
    41         echo ---                 
    42         echo Only for $buildgroup Image!!               
    43         echo ---------------------------                 
    44         exit 1           
    45 fi
     4INSTDIR="$1"
     5PLUGINDIR=$INSTDIR/usr/local/share/titan/plugins/autotimer
    466
    477exit 0
Note: See TracChangeset for help on using the changeset viewer.