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/swapscreensaver_default_1_0/CONTROL
Files:
4 edited

Legend:

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

    r7451 r12781  
    22TMP=/tmp/.swapscreensaver
    33echo "successfully installed"
    4 echo "syncing disk"
     4
     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
    514echo "please reboot your box so that the extension will be mounted..."
    6 sync
    715exit 0
  • ipk/source.sh4/swapscreensaver_default_1_0/CONTROL/postrm

    r7451 r12781  
    55
    66echo "successfully removed"
    7 echo "syncing disk"
    8 sync
     7link=`readlink /var/swap`
     8if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
     9        SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
     10        FREE=`expr $SPACE - 100`
     11        echo new freespace size $FREE kb
     12else
     13        echo "syncing disk"
     14        sync
     15fi
    916exit 0
  • ipk/source.sh4/swapscreensaver_default_1_0/CONTROL/preinst

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

    r7451 r12781  
    11#!/bin/sh
    22TMP=/tmp/.swapscreensaver
    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
    512echo "removing screensaver pictures from swapstick"
    613exit 0
Note: See TracChangeset for help on using the changeset viewer.