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/titanswapskins_default_grey/CONTROL/preinst

    r11782 r12781  
    22#
    33TMP=/tmp/.skin
    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=470
     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"       
Note: See TracChangeset for help on using the changeset viewer.