#!/bin/sh
#
TMP=/tmp/.feeds
echo "syncing disk"
sync

cp /var/etc/ipkg/official-feed.conf /var/etc/ipkg/official-feed.conf.original
echo "Original Datei wird gesichert"

model=`cat /etc/model`
echo""
echo "Überprüfung des Receivers...."
echo ""
if [ "$model" != "atemio500" ]; then
	echo "Entschuldigung! Dieses Plugin funktioniert nicht korrekt auf ihrer $model .."
	echo "Installation wird abgebrochen..."
	exit 1
else
	echo "Boxtype: $model OK"
fi
buildgroup=`cat /etc/.buildgroup`
echo "checking OS"	 
if  [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then 	 	 
	echo --------------------------- 	 	 
	echo DONT USE this IPK Package!! 	 	 
	echo --- 	 	 
	echo Only for $buildgroup Image!! 	 	 
	echo --------------------------- 	 	 
	exit 1 	 	 
fi


echo "Installation des neuen Pluginservers.... "


exit 0
