#!/bin/sh
TMP=/tmp/.infos
PLUGINDIR=/usr/lib/enigma2/python/Plugins/Extensions/streaminfo
rm -r $PLUGINDIR > /dev/null 2>&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`
	FREE=`expr $SPACE - 100`
	echo new freespace size $FREE kb
else
	echo "syncing disk"
	sync
fi
exit 0