Ignore:
Timestamp:
Jan 4, 2012, 7:46:39 AM (14 years ago)
Author:
obi
Message:

[ipk] update all swap/titan flash ipks

Location:
ipk/source.sh4/titanswappicons_white/CONTROL
Files:
4 edited

Legend:

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

    r9890 r12781  
    22TMP=/tmp/.picon
    33echo "successfully installed"
    4 echo "syncing disk"
    5 sync
     4link=`readlink /var/swap`
     5if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
     6        SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
     7        FREE=`expr $SPACE - 100`
     8        echo new freespace size $FREE kb
     9else
     10        echo "syncing disk"
     11        sync
     12fi
    613exit 0
  • ipk/source.sh4/titanswappicons_white/CONTROL/postrm

    r12642 r12781  
    33
    44echo "successfully removed"
    5 echo "syncing disk"
    6 sync
     5link=`readlink /var/swap`
     6if [ `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
     10else
     11        echo "syncing disk"
     12        sync
     13fi
    714exit 0
  • ipk/source.sh4/titanswappicons_white/CONTROL/preinst

    r12691 r12781  
    22#
    33TMP=/tmp/.picon
    4 echo "syncing disk"
    5 sync
    64
    75model=`cat /etc/model`
     
    2624fi
    2725echo "swapstick found...."
    28 
     26link=`readlink /var/swap`
     27if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
     28        SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
     29        FREE=`expr $SPACE - 100`
     30        SIZE=1560
     31        echo "checking freespace"
     32        echo packege size $SIZE kb
     33        echo freespace size $FREE kb
     34        if  [ "$FREE" -lt "$SIZE" ]; then
     35                echo "sorry no freespace left on device"
     36                exit 1
     37        else
     38                echo ok         
     39        fi
     40else
     41        echo "syncing disk"
     42        sync
     43fi
    2944buildgroup=`cat /etc/.buildgroup`
    3045echo "checking OS"       
  • ipk/source.sh4/titanswappicons_white/CONTROL/prerm

    r11102 r12781  
    11#!/bin/sh
    22TMP=/tmp/.picon
    3 echo "syncing disk"
    4 sync
     3link=`readlink /var/swap`
     4if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
     5        SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
     6        FREE=`expr $SPACE - 100`
     7        echo new freespace size $FREE kb
     8else
     9        echo "syncing disk"
     10        sync
     11fi
    512
    613echo "removing picons..."
Note: See TracChangeset for help on using the changeset viewer.