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

[ipk] update all swap/titan flash ipks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ipk/source.sh4/emus_gbox_773/CONTROL/preinst

    r12395 r12781  
    22#
    33TMP=/tmp/.keys
    4 echo "syncing disk"
    5 sync
    64
    75model=`cat /etc/model`
     
    3331fi   
    3432echo "installing gbox and configs..."
    35 
     33if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ]; then
     34        SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
     35        FREE=`expr $SPACE - 100`
     36        SIZE=1360
     37        echo "checking freespace"
     38        echo packege size $SIZE kb
     39        echo freespace size $FREE kb
     40        if  [ "$FREE" -lt "$SIZE" ]; then
     41                echo "sorry no freespace left on device"
     42                exit 1
     43        else
     44                echo ok         
     45        fi
     46else
     47        echo "syncing disk"
     48        sync
     49fi
    3650buildgroup=`cat /etc/.buildgroup`
    3751echo "checking OS"       
     
    4458        exit 1           
    4559fi
    46 sync
     60
    4761exit 0
    4862
Note: See TracChangeset for help on using the changeset viewer.