Changeset 23201


Ignore:
Timestamp:
Sep 2, 2013, 12:02:32 AM (13 years ago)
Author:
tobayer
Message:

[titan] tobayer01 swapskin: test release/beta handling

Location:
ipk/source.sh4/titanswapskins_tobayer01
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • ipk/source.sh4/titanswapskins_tobayer01/CONTROL/postinst

    r13990 r23201  
    11#!/bin/sh
    2 TMP=/tmp/.titanskin
    3 echo "successfully installed"
     2
     3releaseversion=22775
     4plugindir="/var/swap/titanskins/tobayer01"
     5imageversion=`cat /etc/version | cut -d "_" -f2 | sed 's/M//'`;
    46link=`readlink /var/swap`
     7
    58if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
    69        SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
    710        FREE=`expr $SPACE - 100`
    8         echo new freespace size $FREE kb
     11        echo "new freespace size $FREE kb"
    912else
    10         echo "syncing disk"
     13        #echo "syncing disk"
    1114        sync
    1215fi
     16
     17echo "successfully installed"
    1318echo "now you can choose the new skin...."
    1419
     20if  [ "$imageversion" -gt "$releaseversion" ]; then
     21        echo "=> non-release image"
     22        echo "==> rm $plugindir/skin_release.xml"
     23        rm $plugindir/skin_release.xml
     24else
     25        echo "=> release image"
     26        echo "==> mv $plugindir/skin_release.xml $plugindir/skin.xml"
     27        mv $plugindir/skin_release.xml $plugindir/skin.xml
     28fi
     29
    1530exit 0
  • ipk/source.sh4/titanswapskins_tobayer01/CONTROL/postrm

    r15994 r23201  
    11#!/bin/sh
    2 TMP=/tmp/.titanskin
    32
    4 rm -rf /var/swap/titanskins/tobayer01
     3plugin="tobayer01 swapskin"
     4plugindir="/var/swap/titanskins/tobayer01"
     5link=`readlink /var/swap`
    56
    6 echo "successfully removed"
    7 link=`readlink /var/swap`
     7rm -rf $plugindir
     8
    89if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
    910        SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
    1011        FREE=`expr $SPACE - 100`
    11         echo new freespace size $FREE kb
     12        echo "New free space: $FREE kb"
    1213else
    13         echo "syncing disk"
     14        #echo "syncing disk"
    1415        sync
    1516fi
     17
     18echo "Successfully removed $plugin"
     19
    1620exit 0
  • ipk/source.sh4/titanswapskins_tobayer01/CONTROL/preinst

    r15994 r23201  
    11#!/bin/sh
    2 #
    3 TMP=/tmp/.titanskin
    4 echo "syncing disk"
     2
     3plugin="tobayer01 swapskin"
     4plugindir="/var/swap/titanskins/tobayer01"
     5pluginsize=2300
     6model=`cat /etc/model`
     7link=`readlink /var/swap`
     8buildgroup=`cat /etc/.buildgroup`
     9
     10#echo "syncing disk"
    511sync
     12#echo""
    613
    7 model=`cat /etc/model`
    8 echo""
    9 echo "Checking your Boxtype...."
    10 echo "Some Plugins will not work correctly on your $model!"
    11 echo ""
     14echo "Checking your box type..."
    1215if [ "$model" = "" ]; then
    13         echo "Sorry! This Plugin is not available for your $model because it will not work correctly!!!"
     16        echo ""
     17        echo "Sorry! This plugin is not available for your $model, because it will not work correctly!"
    1418        echo "Aborting installation..."
    1519        exit 1
    1620else
    17         echo "Boxtype: $model OK"
     21        echo "Box type $model OK."
    1822fi
    1923
    20 echo "checking swapstick"
     24echo "Checking swapstick..."
    2125if [ ! -d /var/swap/titanskins/ ]; then
    22   echo "--------------------------"
    23         echo "no swapstick found...."
    24         echo "--------------------------"
     26        echo "----------------------"
     27        echo "Swapstick not found..."
     28        echo "----------------------"
    2529        exit 1
     30else
     31        echo "Swapstick found..."
    2632fi
    27 echo "swapstick found...."
    28 link=`readlink /var/swap`
     33
    2934if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
    3035        SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
    3136        FREE=`expr $SPACE - 100`
    32         SIZE=1050
    33         echo "checking freespace"
    34         echo package size $SIZE kb
    35         echo freespace size $FREE kb
    36         if  [ "$FREE" -lt "$SIZE" ]; then
    37                 echo "sorry no freespace left on device"
     37        echo "Checking free space..."
     38        echo "Package size $pluginsize kb"
     39        echo "Free space $FREE kb"
     40        if  [ "$FREE" -lt "$pluginsize" ]; then
     41                echo "Sorry, not enough free space on your device!"
    3842                exit 1
    3943        else
    40                 echo ok         
     44                echo "OK"
    4145        fi
    4246else
    43         echo "syncing disk"
     47        #echo "Syncing disk..."
    4448        sync
    4549fi
    4650
    47 buildgroup=`cat /etc/.buildgroup`
    48 echo "checking OS"       
    49 if  [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then               
    50         echo ---------------------------                 
    51         echo DONT USE this IPK Package!!                 
    52         echo ---                 
    53         echo Only for $buildgroup Image!!               
    54         echo ---------------------------                 
    55         exit 1           
     51echo "Checking OS..."   
     52if [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then               
     53        echo "---------------------------"
     54        echo "Don't use this TPK package!"
     55        echo "---"
     56        echo "Only for $buildgroup image!"
     57        echo "---------------------------"
     58        exit 1
    5659fi
    5760
    58 rm -rf /var/swap/titanskins/tobayer01
    59 
    60 echo "installing tobayer01 skin to swapstick..."
     61rm -rf $plugindir
     62echo "Installing $plugin..."
    6163
    6264exit 0
  • ipk/source.sh4/titanswapskins_tobayer01/CONTROL/prerm

    r12781 r23201  
    11#!/bin/sh
    2 TMP=/tmp/.titanskin
     2
     3plugin="tobayer01 swapskin"
    34link=`readlink /var/swap`
     5
    46if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
    57        SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
    68        FREE=`expr $SPACE - 100`
    7         echo new freespace size $FREE kb
     9        echo "Old free space: $FREE kb"
    810else
    9         echo "syncing disk"
     11        #echo "syncing disk"
    1012        sync
    1113fi
    12 echo "removing tobayer01 skin from swapstick"
     14
     15echo "Removing $plugin..."
     16
    1317exit 0
  • ipk/source.sh4/titanswapskins_tobayer01/var/swap/titanskins/tobayer01/skin.xml

    r23046 r23201  
     1### skin.xml for beta images
     2
    13<screen name="autores" font="font1" charspace="-1" fontsize="30" fontcol="fontcol" posx="50" posy="650" width="120" height="40" bgcol="bgcol_grey" halign="center" valign="middle" bordercol="bordercol" bordersize="1">
    24</screen>
Note: See TracChangeset for help on using the changeset viewer.