source: ipk/source.sh4/titanswapwlan_8712u/CONTROL/postrm@ 20053

Last change on this file since 20053 was 20053, checked in by obi, 13 years ago

fix swapwlan ipks remove first all swap/mnt driver

  • Property svn:executable set to *
File size: 530 bytes
Line 
1#!/bin/sh
2TMP=/tmp/.tmp
3
4rm -rf /var/swap/modules/8712u.ko > /dev/null 2>&1
5rm -rf /mnt/swapextensions/modules/8712u.ko > /dev/null 2>&1
6
7echo "successfully removed"
8link=`readlink /var/swap`
9if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
10 SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
11 FREE=`expr $SPACE - 100`
12 echo new freespace size $FREE kb
13else
14 echo "syncing disk"
15 sync
16fi
17exit 0
Note: See TracBrowser for help on using the repository browser.