Ignore:
Timestamp:
Sep 10, 2013, 7:28:16 PM (13 years ago)
Author:
nit
Message:
 
Location:
ipk/source/skins_MetrixHD/CONTROL
Files:
4 edited

Legend:

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

    r20914 r23640  
    11#!/bin/sh
    2 TMP=/tmp/.titanskin
    3 
    4 
    5 echo "successfully installed"
    6 link=`readlink /var/swap`
    7 if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
    8         SPACE=`df | grep /dev/mtdblock | grep mnt | 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
    15 echo "now you can choose the new skin...."
    162
    173exit 0
  • ipk/source/skins_MetrixHD/CONTROL/postrm

    r20914 r23640  
    11#!/bin/sh
    2 TMP=/tmp/.titanskin
    32
    4 
    5 rm -rf /var/swap/titanskins/MetrixHD
    6 
    7 echo "successfully removed"
    8 link=`readlink /var/swap`
    9 if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
    10         SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
    11         FREE=`expr $SPACE - 100`
    12         echo new freespace size $FREE kb
    13 else
    14         echo "syncing disk"
    15         sync
    16 fi
    173exit 0
  • 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
  • ipk/source/skins_MetrixHD/CONTROL/prerm

    r20914 r23640  
    11#!/bin/sh
    2 TMP=/tmp/.titanskin
    32
    4 
    5 link=`readlink /var/swap`
    6 if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
    7         SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
    8         FREE=`expr $SPACE - 100`
    9         echo new freespace size $FREE kb
    10 else
    11         echo "syncing disk"
    12         sync
    13 fi
    14 echo "removing MetrixHD skin from swapstick"
    153exit 0
Note: See TracChangeset for help on using the changeset viewer.