Changeset 23447 for ipk/source.sh4


Ignore:
Timestamp:
Sep 8, 2013, 5:57:11 PM (13 years ago)
Author:
gost
Message:

[plugin] IP-Kammera new tpk

Location:
ipk/source.sh4/titantools_IP-Kammera
Files:
5 edited
1 moved

Legend:

Unmodified
Added
Removed
  • ipk/source.sh4/titantools_IP-Kammera/CONTROL/control

    r23113 r23447  
    11Package: titan-plugin-tools-ipkammera
    2 Version: 0.1
     2Version: 1.0
    33Architecture: sh4
    44OE: IPKammera
  • ipk/source.sh4/titantools_IP-Kammera/CONTROL/postinst

    r18513 r23447  
    11#!/bin/sh
    22TMP=/tmp/.infos
    3 
     3INSTDIR="$1"
     4PLUGINDIR=$INSTDIR/usr/local/share/titan/plugins/instar
    45if [ -e /tmp/instar.conf ]; then
    5         mv /var/usr/local/share/titan/plugins/instar/instar.conf /var/usr/local/share/titan/plugins/instar/instar.conf_org
    6         cp  /tmp/instar.conf /var/usr/local/share/titan/plugins/instar/instar.conf
     6        mv $PLUGINDIR/instar.conf $PLUGINDIR/instar.conf_org
     7        cp  /tmp/instar.conf $PLUGINDIR/instar.conf
    78        rm /tmp/instar.conf
    89fi
    910
    10 echo "successfully installed"
    11 if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ]; then
    12         SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
    13         FREE=`expr $SPACE - 100`
    14         echo new freespace size $FREE kb
    15 else
    16         echo "syncing disk"
    17         sync
    18 fi
    1911exit 0
  • ipk/source.sh4/titantools_IP-Kammera/CONTROL/postrm

    r16100 r23447  
    11#!/bin/sh
    22TMP=/tmp/.infos
    3 PLUGINDIR=/var/usr/local/share/titan/plugins/permtime
     3INSTDIR="$1"
     4PLUGINDIR=$INSTDIR/usr/local/share/titan/plugins/instar
    45rm -r $PLUGINDIR > /dev/null 2>&1
    56
    6 echo "successfully removed"
    7 if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ]; then
    8         SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
    9         FREE=`expr $SPACE - 100`
    10         echo new freespace size $FREE kb
    11 else
    12         echo "syncing disk"
    13         sync
    14 fi
    157exit 0
  • ipk/source.sh4/titantools_IP-Kammera/CONTROL/preinst

    r18513 r23447  
    22#
    33TMP=/tmp/.infos
     4INSTDIR="$1"
     5PLUGINDIR=$INSTDIR/usr/local/share/titan/plugins/instar
    46
    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"
     7if [ -e $PLUGINDIR/instar.conf ]; then
     8        cp $PLUGINDIR/instar.conf /tmp/instar.conf
    169fi
    1710
    18 echo "install IP-Kammera 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=40
    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
    46 
    47 if [ -e /var/usr/local/share/titan/plugins/instar/instar.conf ]; then
    48         cp /var/usr/local/share/titan/plugins/instar/instar.conf /tmp/instar.conf
    49 fi
    50 
    51 rm -rf /var/usr/local/share/titan/plugins/instar
     11rm -rf $PLUGINDIR
    5212
    5313exit 0
  • ipk/source.sh4/titantools_IP-Kammera/CONTROL/prerm

    r16100 r23447  
    11#!/bin/sh
    22TMP=/tmp/.infos
    3 if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ]; then
    4         SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
    5         FREE=`expr $SPACE - 100`
    6         echo new freespace size $FREE kb
    7 else
    8         echo "syncing disk"
    9         sync
    10 fi
    11 echo "removing IP-Kammera Plugin"
     3INSTDIR="$1"
     4PLUGINDIR=$INSTDIR/usr/local/share/titan/plugins/instar
     5
    126exit 0
Note: See TracChangeset for help on using the changeset viewer.