Ignore:
Timestamp:
09/10/13 19:28:16 (8 years ago)
Author:
nit
Message:
 
Location:
ipk/source/skins_default/CONTROL
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • ipk/source/skins_default/CONTROL/postinst

    r16391 r23640  
    11#!/bin/sh
    2 TMP=/tmp/.titanskin
    3 echo "successfully installed"
    4 echo "syncing disk"
    5 sync
    6 
    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
    152
    163exit 0
  • ipk/source/skins_default/CONTROL/postrm

    r17124 r23640  
    11#!/bin/sh
    2 TMP=/tmp/.skin
     2INSTDIR="$1"
    33
    4 PLUGINDIR=/var/usr/local/share/titan/skin/default
    5 rm -rf /var/usr/local/share/titan/skin/default
     4if [ "$INSTDIR" == "/var" ]; then
     5        rm -rf "$INSTDIR/usr/local/share/titan/skin/default"
    66
    7 echo "successfully removed"
    8 if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ]; then
    9         SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
    10         FREE=`expr $SPACE - 100`
    11         echo new freespace size $FREE kb
    12 else
    13         echo "syncing disk"
    14         sync
     7        echo "restore default skin"
     8        ln -s /lib/titan/default "$INSTDIR/usr/local/share/titan/skin/default"
     9        rm -rf "$INSTDIR/etc/titan/skinconfig"
     10        cp -a /lib/titan/default/skinconfig.default "$INSTDIR/etc/titan/skinconfig"
    1511fi
    1612
    17 echo "restore default skin"
    18 ln -s /lib/titan/default /var/usr/local/share/titan/skin/default
    19 rm -rf /var/etc/titan/skinconfig
    20 cp -a /lib/titan/default/skinconfig.default /var/etc/titan/skinconfig
    21 
    2213exit 0
  • ipk/source/skins_default/CONTROL/preinst

    r16391 r23640  
    11#!/bin/sh
    2 #
    3 TMP=/tmp/.titanskin
     2INSTDIR="$1"
    43
    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"
     4if [ "$INSTDIR" == "/var" ]; then
     5        rm -rf "$INSTDIR/usr/local/share/titan/skin/default"
    166fi
    177
    18 if [ `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`
    20         FREE=`expr $SPACE - 100`
    21         SIZE=720
    22         echo "checking freespace"
    23         echo packege size $SIZE kb
    24         echo freespace size $FREE kb
    25         if  [ "$FREE" -lt "$SIZE" ]; then
    26                 echo "sorry no freespace left on device"
    27                 exit 1
    28         else
    29                 echo ok         
    30         fi
    31 else
    32         echo "syncing disk"
    33         sync
    34 fi
    35 echo "installing Default Skin ..."
    36 
    37 
    38 rm -rf /var/usr/local/share/titan/skin/default
    398exit 0
  • ipk/source/skins_default/CONTROL/prerm

    r16391 r23640  
    11#!/bin/sh
    2 TMP=/tmp/.titanskin
    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 Default Skin"
     2
    123exit 0
Note: See TracChangeset for help on using the changeset viewer.