Index: ipk/source.sh4/titanskins_0Acht5Zehn/CONTROL/postrm
===================================================================
--- ipk/source.sh4/titanskins_0Acht5Zehn/CONTROL/postrm	(revision 12781)
+++ ipk/source.sh4/titanskins_0Acht5Zehn/CONTROL/postrm	(revision 23281)
@@ -1,16 +1,22 @@
 #!/bin/sh
-TMP=/tmp/.skin
 
-PLUGINDIR=/var/usr/local/share/titan/skin/0Acht5Zehn
-rm -r /var/usr/local/share/titan/skin/0Acht5Zehn
+plugin_short="0Acht5Zehn"
+plugin_type="skin"
+plugin_target="/var/usr/local/share/titan/skin"
 
-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`
-	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
