Index: ipk/source.sh4/titangames_catcatch/CONTROL/postrm
===================================================================
--- ipk/source.sh4/titangames_catcatch/CONTROL/postrm	(revision 16975)
+++ ipk/source.sh4/titangames_catcatch/CONTROL/postrm	(revision 23366)
@@ -1,15 +1,13 @@
 #!/bin/sh
-TMP=/tmp/.games
-PLUGINDIR=/var/usr/local/share/titan/plugins/catcatch
-rm -r $PLUGINDIR > /dev/null 2>&1
+INSTDIR="$1"
 
 echo "successfully removed"
-if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ]; then
-	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
+if [ "/var/swap" == "$INSTDIR" ]; then
+	echo "syncing disk"
+	sync
+else
+	SPACE=`getfreespace "$INSTDIR"`
 	FREE=`expr $SPACE - 100`
 	echo new freespace size $FREE kb
-else
-	echo "syncing disk"
-	sync
 fi
 exit 0
