Index: ipk/source.sh4/titanswapskins_0Acht5Zehn/CONTROL/postrm
===================================================================
--- ipk/source.sh4/titanswapskins_0Acht5Zehn/CONTROL/postrm	(revision 15994)
+++ ipk/source.sh4/titanswapskins_0Acht5Zehn/CONTROL/postrm	(revision 23281)
@@ -1,17 +1,22 @@
 #!/bin/sh
-TMP=/tmp/.skin
 
-PLUGINDIR=/var/swap/titanskins/0Acht5Zehn
-rm -rf /var/swap/titanskins/0Acht5Zehn
+plugin_short="0Acht5Zehn"
+plugin_type="swapskin"
+plugin_target="/var/swap/titanskins"
 
-echo "successfully removed"
-link=`readlink /var/swap`
-if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
-	SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
-	FREE=`expr $SPACE - 100`
-	echo new freespace size $FREE kb
-else
-	echo "syncing disk"
-	sync
-fi
+plugin_dir="$plugin_target/$plugin_short"
+plugin="$plugin_short $plugin_type"
+
+
+### MAIN ###
+
+rm -rf $plugin_dir
+
+sync
+SPACE=`getfreespace $plugin_target`
+FREE=`expr $SPACE - 100`
+echo "New free space: ${FREE}kB"
+echo
+echo "Successfully removed $plugin."
+
 exit 0
