Index: /ipk/source/emus_gbox_773/CONTROL/postinst
===================================================================
--- /ipk/source/emus_gbox_773/CONTROL/postinst	(revision 6662)
+++ /ipk/source/emus_gbox_773/CONTROL/postinst	(revision 6663)
@@ -12,3 +12,40 @@
 	echo new freespace size $FREE kb
 fi
+
+if [ ! -e /var/keys/cwshare.cfg ]; then
+	echo "use ipk config file: cwshare.cfg"
+	echo "rename /var/keys/cwshare.cfg.gbox > /var/keys/cwshare.cfg"
+	mv /var/keys/cwshare.cfg.gbox /var/keys/cwshare.cfg
+else
+	echo "found user config file: cwshare.cfg"
+	echo "skip ipk config file: cwshare.cfg.gbox"
+fi
+
+if [ ! -e /var/keys/gbox_cfg ]; then
+	echo "use ipk config file: gbox_cfg"
+	echo "rename /var/keys/gbox_cfg.gbox > /var/keys/gbox_cfg"
+	mv /var/keys/gbox_cfg.gbox /var/keys/gbox_cfg
+else
+	echo "found user config file: gbox_cfg"
+	echo "skip ipk config file: gbox_cfg.gbox"
+fi
+
+if [ ! -e /var/keys/ignore.list ]; then
+	echo "use ipk config file: ignore.list"
+	echo "rename /var/keys/ignore.list.gbox > /var/keys/ignore.list"
+	mv /var/keys/ignore.list.gbox /var/keys/ignore.list
+else
+	echo "found user config file: ignore.list"
+	echo "skip ipk config file: ignore.list.gbox"
+fi
+
+if [ ! -e /var/keys/softcam.cfg ]; then
+	echo "use ipk config file: softcam.cfg"
+	echo "rename /var/keys/softcam.cfg.gbox > /var/keys/softcam.cfg"
+	mv /var/keys/softcam.cfg.gbox /var/keys/softcam.cfg
+else
+	echo "found user config file: softcam.cfg"
+	echo "skip ipk config file: softcam.cfg.gbox"
+fi
+
 exit 0
Index: /ipk/source/emus_gbox_773/CONTROL/postrm
===================================================================
--- /ipk/source/emus_gbox_773/CONTROL/postrm	(revision 6662)
+++ /ipk/source/emus_gbox_773/CONTROL/postrm	(revision 6663)
@@ -10,24 +10,4 @@
 fi
 
-if [ -e /var/keys/cwshare.cfg.bak ]; then
-	echo "renaming your saved cwshare.cfg"
-	mv /var/keys/cwshare.cfg.bak /var/keys/cwshare.cfg
-fi
-
-if [ -e /var/keys/gbox_cfg.bak ]; then
-	echo "renaming your saved gbox_cfg"
-	mv /var/keys/gbox_cfg.bak /var/keys/gbox_cfg
-fi
-
-if [ -e /var/keys/ignore.list.bak ]; then
-	echo "renaming your saved ignore.list"
-	mv /var/keys/ignore.list.bak /var/keys/ignore.list
-fi
-
-if [ -e /var/keys/softcam.cfg.bak ]; then
-	echo "renaming your saved softcam.cfg"
-	mv /var/keys/softcam.cfg.bak /var/keys/softcam.cfg
-fi
-
 sync
 
Index: /ipk/source/emus_gbox_773/CONTROL/preinst
===================================================================
--- /ipk/source/emus_gbox_773/CONTROL/preinst	(revision 6662)
+++ /ipk/source/emus_gbox_773/CONTROL/preinst	(revision 6663)
@@ -32,5 +32,5 @@
 	fi
 fi   
-echo "installing gbox config..."
+echo "installing gbox and configs..."
 echo "checking OS"
 if  [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then
@@ -43,24 +43,5 @@
 fi
 
-if [ -e /var/keys/cwshare.cfg ]; then
-	echo "saving your actual cwshare.cfg"
-	mv /var/keys/cwshare.cfg /var/keys/cwshare.cfg.bak
-fi
-
-if [ -e /var/keys/gbox_cfg ]; then
-	echo "saving your actual gbox_cfg"
-	mv /var/keys/gbox_cfg /var/keys/gbox_cfg.bak
-fi
-
-if [ -e /var/keys/ignore.list ]; then
-	echo "saving your actual ignore.list"
-	mv /var/keys/ignore.list /var/keys/ignore.list.bak
-fi
-
-if [ -e /var/keys/softcam.cfg ]; then
-	echo "saving your actual softcam.cfg"
-	mv /var/keys/softcam.cfg /var/keys/softcam.cfg.bak
-fi
-
 sync
 exit 0
+
Index: /ipk/source/emus_gbox_773/CONTROL/prerm
===================================================================
--- /ipk/source/emus_gbox_773/CONTROL/prerm	(revision 6662)
+++ /ipk/source/emus_gbox_773/CONTROL/prerm	(revision 6663)
@@ -8,4 +8,30 @@
 	echo freespace size $FREE kb
 fi
+
+if [ ! -e /var/keys/oscam.conf.oscam ]; then
+	echo "remove ipk oscam.conf"
+	rm /var/keys/oscam.conf
+fi
+
+if [ ! -e /var/keys/cwshare.cfg.gbox ]; then
+	echo "remove ipk cwshare.cfg"
+	rm /var/keys/cwshare.cfg
+fi
+
+if [ ! -e /var/keys/gbox_cfg.gbox ]; then
+	echo "remove ipk gbox_cfg"
+	rm /var/keys/gbox_cfg
+fi
+
+if [ ! -e /var/keys/ignore.list.gbox ]; then
+	echo "remove ipk ignore.list"
+	rm /var/keys/ignore.list
+fi
+
+if [ ! -e /var/keys/softcam.cfg.gbox ]; then
+	echo "remove ipk softcam.cfg"
+	rm /var/keys/softcam.cfg
+fi
+
 echo "removing gbox and configs"
 exit 0
Index: /ipk/source/emus_gbox_790/CONTROL/postinst
===================================================================
--- /ipk/source/emus_gbox_790/CONTROL/postinst	(revision 6662)
+++ /ipk/source/emus_gbox_790/CONTROL/postinst	(revision 6663)
@@ -12,3 +12,40 @@
 	echo new freespace size $FREE kb
 fi
+
+if [ ! -e /var/keys/cwshare.cfg ]; then
+	echo "use ipk config file: cwshare.cfg"
+	echo "rename /var/keys/cwshare.cfg.gbox > /var/keys/cwshare.cfg"
+	mv /var/keys/cwshare.cfg.gbox /var/keys/cwshare.cfg
+else
+	echo "found user config file: cwshare.cfg"
+	echo "skip ipk config file: cwshare.cfg.gbox"
+fi
+
+if [ ! -e /var/keys/gbox_cfg ]; then
+	echo "use ipk config file: gbox_cfg"
+	echo "rename /var/keys/gbox_cfg.gbox > /var/keys/gbox_cfg"
+	mv /var/keys/gbox_cfg.gbox /var/keys/gbox_cfg
+else
+	echo "found user config file: gbox_cfg"
+	echo "skip ipk config file: gbox_cfg.gbox"
+fi
+
+if [ ! -e /var/keys/ignore.list ]; then
+	echo "use ipk config file: ignore.list"
+	echo "rename /var/keys/ignore.list.gbox > /var/keys/ignore.list"
+	mv /var/keys/ignore.list.gbox /var/keys/ignore.list
+else
+	echo "found user config file: ignore.list"
+	echo "skip ipk config file: ignore.list.gbox"
+fi
+
+if [ ! -e /var/keys/softcam.cfg ]; then
+	echo "use ipk config file: softcam.cfg"
+	echo "rename /var/keys/softcam.cfg.gbox > /var/keys/softcam.cfg"
+	mv /var/keys/softcam.cfg.gbox /var/keys/softcam.cfg
+else
+	echo "found user config file: softcam.cfg"
+	echo "skip ipk config file: softcam.cfg.gbox"
+fi
+
 exit 0
Index: /ipk/source/emus_gbox_790/CONTROL/postrm
===================================================================
--- /ipk/source/emus_gbox_790/CONTROL/postrm	(revision 6662)
+++ /ipk/source/emus_gbox_790/CONTROL/postrm	(revision 6663)
@@ -10,24 +10,4 @@
 fi
 
-if [ -e /var/keys/cwshare.cfg.bak ]; then
-	echo "renaming your saved cwshare.cfg"
-	mv /var/keys/cwshare.cfg.bak /var/keys/cwshare.cfg
-fi
-
-if [ -e /var/keys/gbox_cfg.bak ]; then
-	echo "renaming your saved gbox_cfg"
-	mv /var/keys/gbox_cfg.bak /var/keys/gbox_cfg
-fi
-
-if [ -e /var/keys/ignore.list.bak ]; then
-	echo "renaming your saved ignore.list"
-	mv /var/keys/ignore.list.bak /var/keys/ignore.list
-fi
-
-if [ -e /var/keys/softcam.cfg.bak ]; then
-	echo "renaming your saved softcam.cfg"
-	mv /var/keys/softcam.cfg.bak /var/keys/softcam.cfg
-fi
-
 sync
 
Index: /ipk/source/emus_gbox_790/CONTROL/preinst
===================================================================
--- /ipk/source/emus_gbox_790/CONTROL/preinst	(revision 6662)
+++ /ipk/source/emus_gbox_790/CONTROL/preinst	(revision 6663)
@@ -32,5 +32,5 @@
 	fi
 fi   
-echo "installing gbox config..."
+echo "installing gbox and configs..."
 echo "checking OS"
 if  [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then
@@ -43,24 +43,4 @@
 fi
 
-if [ -e /var/keys/cwshare.cfg ]; then
-	echo "saving your actual cwshare.cfg"
-	mv /var/keys/cwshare.cfg /var/keys/cwshare.cfg.bak
-fi
-
-if [ -e /var/keys/gbox_cfg ]; then
-	echo "saving your actual gbox_cfg"
-	mv /var/keys/gbox_cfg /var/keys/gbox_cfg.bak
-fi
-
-if [ -e /var/keys/ignore.list ]; then
-	echo "saving your actual ignore.list"
-	mv /var/keys/ignore.list /var/keys/ignore.list.bak
-fi
-
-if [ -e /var/keys/softcam.cfg ]; then
-	echo "saving your actual softcam.cfg"
-	mv /var/keys/softcam.cfg /var/keys/softcam.cfg.bak
-fi
-
 sync
 exit 0
Index: /ipk/source/emus_gbox_790/CONTROL/prerm
===================================================================
--- /ipk/source/emus_gbox_790/CONTROL/prerm	(revision 6662)
+++ /ipk/source/emus_gbox_790/CONTROL/prerm	(revision 6663)
@@ -8,4 +8,31 @@
 	echo freespace size $FREE kb
 fi
+
+if [ ! -e /var/keys/oscam.conf.oscam ]; then
+	echo "remove ipk oscam.conf"
+	rm /var/keys/oscam.conf
+fi
+
+if [ ! -e /var/keys/cwshare.cfg.gbox ]; then
+	echo "remove ipk cwshare.cfg"
+	rm /var/keys/cwshare.cfg
+fi
+
+if [ ! -e /var/keys/gbox_cfg.gbox ]; then
+	echo "remove ipk gbox_cfg"
+	rm /var/keys/gbox_cfg
+fi
+
+if [ ! -e /var/keys/ignore.list.gbox ]; then
+	echo "remove ipk ignore.list"
+	rm /var/keys/ignore.list
+fi
+
+if [ ! -e /var/keys/softcam.cfg.gbox ]; then
+	echo "remove ipk softcam.cfg"
+	rm /var/keys/softcam.cfg
+fi
+
 echo "removing gbox and configs"
 exit 0
+
Index: /ipk/source/emus_incubus_1_22/CONTROL/postinst
===================================================================
--- /ipk/source/emus_incubus_1_22/CONTROL/postinst	(revision 6662)
+++ /ipk/source/emus_incubus_1_22/CONTROL/postinst	(revision 6663)
@@ -12,3 +12,40 @@
 	echo new freespace size $FREE kb
 fi
+
+if [ ! -e /var/keys/incubusCamd.channelinfo ]; then
+	echo "use ipk config file: incubusCamd.channelinfo"
+	echo "rename /var/keys/incubusCamd.channelinfo.incubus > /var/keys/incubusCamd.channelinfo"
+	mv /var/keys/incubusCamd.channelinfo.incubus /var/keys/incubusCamd.channelinfo
+else
+	echo "found user config file: incubusCamd.channelinfo"
+	echo "skip ipk config file: incubusCamd.channelinfo.incubus"
+fi
+
+if [ ! -e /var/keys/incubusCamd.conf ]; then
+	echo "use ipk config file: incubusCamd.conf"
+	echo "rename /var/keys/incubusCamd.conf.incubus > /var/keys/incubusCamd.conf"
+	mv /var/keys/incubusCamd.conf.incubus /var/keys/incubusCamd.conf
+else
+	echo "found user config file: incubusCamd.conf"
+	echo "skip ipk config file: incubusCamd.conf.incubus"
+fi
+
+if [ ! -e /var/keys/incubusCamd.prio ]; then
+	echo "use ipk config file: incubusCamd.prio"
+	echo "rename /var/keys/incubusCamd.prio.incubus > /var/keys/incubusCamd.prio"
+	mv /var/keys/incubusCamd.prio.incubus /var/keys/incubusCamd.prio
+else
+	echo "found user config file: incubusCamd.prio"
+	echo "skip ipk config file: incubusCamd.prio.incubus"
+fi
+
+if [ ! -e /var/keys/incubusCamd.providers ]; then
+	echo "use ipk config file: incubusCamd.providers"
+	echo "rename /var/keys/incubusCamd.providers.incubus > /var/keys/incubusCamd.providers"
+	mv /var/keys/incubusCamd.providers.incubus /var/keys/incubusCamd.providers
+else
+	echo "found user config file: incubusCamd.providers"
+	echo "skip ipk config file: incubusCamd.providers.incubus"
+fi
+
 exit 0
Index: /ipk/source/emus_incubus_1_22/CONTROL/postrm
===================================================================
--- /ipk/source/emus_incubus_1_22/CONTROL/postrm	(revision 6662)
+++ /ipk/source/emus_incubus_1_22/CONTROL/postrm	(revision 6663)
@@ -10,25 +10,4 @@
 fi
 
-if [ -e /var/keys/incubusCamd.conf.bak ]; then
-	echo "renaming your saved incubusCamd.conf"
-	mv /var/keys/incubusCamd.conf.bak /var/keys/incubusCamd.conf
-fi
-
-if [ -e /var/keys/incubusCamd.providers.bak ]; then
-	echo "renaming your saved incubusCamd.providers"
-	mv /var/keys/incubusCamd.providers.bak /var/keys/incubusCamd.providers
-fi
-
-if [ -e /var/keys/incubusCamd.prio.bak ]; then
-	echo "renaming your saved incubusCamd.prio"
-	mv /var/keys/incubusCamd.prio.bak /var/keys/incubusCamd.prio
-fi
-
-if [ -e /var/keys/incubusCamd.channelinfo.bak ]; then
-	echo "renaming your saved incubusCamd.channelinfo"
-	mv /var/keys/incubusCamd.channelinfo.bak /var/keys/incubusCamd.channelinfo
-fi
-
-
 sync
 
Index: /ipk/source/emus_incubus_1_22/CONTROL/preinst
===================================================================
--- /ipk/source/emus_incubus_1_22/CONTROL/preinst	(revision 6662)
+++ /ipk/source/emus_incubus_1_22/CONTROL/preinst	(revision 6663)
@@ -32,5 +32,5 @@
 	fi
 fi   
-echo "installing Incubus config..."
+echo "installing incubus and configs..."
 echo "checking OS"
 if  [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then
@@ -43,24 +43,4 @@
 fi
 
-if [ -e /var/keys/incubusCamd.conf ]; then
-	echo "saving your actual incubusCamd.conf"
-	mv /var/keys/incubusCamd.conf /var/keys/incubusCamd.conf.bak
-fi
-
-if [ -e /var/keys/incubusCamd.providers ]; then
-	echo "saving your actual incubusCamd.providers"
-	mv /var/keys/incubusCamd.providers /var/keys/incubusCamd.providers.bak
-fi
-
-if [ -e /var/keys/incubusCamd.prio ]; then
-	echo "saving your actual incubusCamd.prio"
-	mv /var/keys/incubusCamd.prio /var/keys/incubusCamd.prio.bak
-fi
-
-if [ -e /var/keys/incubusCamd.channelinfo ]; then
-	echo "saving your actual incubusCamd.channelinfo"
-	mv /var/keys/incubusCamd.channelinfo /var/keys/incubusCamd.channelinfo.bak
-fi
-
 sync
 exit 0
Index: /ipk/source/emus_incubus_1_22/CONTROL/prerm
===================================================================
--- /ipk/source/emus_incubus_1_22/CONTROL/prerm	(revision 6662)
+++ /ipk/source/emus_incubus_1_22/CONTROL/prerm	(revision 6663)
@@ -8,4 +8,25 @@
 	echo freespace size $FREE kb
 fi
-echo "removing Incubus and configs"
+
+if [ ! -e /var/keys/incubusCamd.channelinfo.incubus ]; then
+	echo "remove ipk incubusCamd.channelinfo"
+	rm /var/keys/incubusCamd.channelinfo
+fi
+
+if [ ! -e /var/keys/incubusCamd.conf.incubus ]; then
+	echo "remove ipk incubusCamd.conf"
+	rm /var/keys/incubusCamd.conf
+fi
+
+if [ ! -e /var/keys/incubusCamd.prio.incubus ]; then
+	echo "remove ipk incubusCamd.prio"
+	rm /var/keys/incubusCamd.prio
+fi
+
+if [ ! -e /var/keys/incubusCamd.providers.incubus ]; then
+	echo "remove ipk incubusCamd.providers"
+	rm /var/keys/incubusCamd.providers
+fi
+
+echo "removing incubus and configs"
 exit 0
Index: /ipk/source/emus_kbox_1_01pre24/CONTROL/postinst
===================================================================
--- /ipk/source/emus_kbox_1_01pre24/CONTROL/postinst	(revision 6662)
+++ /ipk/source/emus_kbox_1_01pre24/CONTROL/postinst	(revision 6663)
@@ -1,19 +1,8 @@
 #!/bin/sh
-TMP=/tmp/.kbox
-PLUGINDIR=/var/emu
+TMP=/tmp/.keys
+PLUGINDIR=/var/keys
+PLUGINDIR=/var/bin
 CONFIGDIR=/var/etc
-if [ ! -e /var/keys/cwshare.cfg ]; then
-	echo "rename cwshare.cfg.kbox -> cwshare.cfg"
-	mv /var/keys/cwshare.cfg.kbox /var/keys/cwshare.cfg
-fi
-if [ ! -e /var/keys/kbox_cfg ]; then
-	echo "rename kbox_cfg.kbox -> kbox_cfg"
-	mv /var/keys/kbox_cfg.kbox /var/keys/kbox_cfg
-fi
-if [ ! -e /var/keys/nwcdcs.cfg ]; then
-	echo "rename nwcdcs.cfg.kbox -> nwcdcs.cfg"
-	mv /var/keys/nwcdcs.cfg.kbox /var/keys/nwcdcs.cfg
-fi
-echo "successful installed"
+echo "successfully installed"
 echo "syncing disk"
 sync
@@ -23,3 +12,31 @@
 	echo new freespace size $FREE kb
 fi
+
+if [ ! -e /var/keys/cwshare.cfg ]; then
+	echo "use ipk config file: cwshare.cfg"
+	echo "rename /var/keys/cwshare.cfg.kbox > /var/keys/cwshare.cfg"
+	mv /var/keys/cwshare.cfg.kbox /var/keys/cwshare.cfg
+else
+	echo "found user config file: cwshare.cfg"
+	echo "skip ipk config file: cwshare.cfg.kbox"
+fi
+
+if [ ! -e /var/keys/kbox_cfg ]; then
+	echo "use ipk config file: kbox_cfg"
+	echo "rename /var/keys/kbox_cfg.kbox > /var/keys/kbox_cfg"
+	mv /var/keys/kbox_cfg.kbox /var/keys/kbox_cfg
+else
+	echo "found user config file: kbox_cfg"
+	echo "skip ipk config file: kbox_cfg.kbox"
+fi
+
+if [ ! -e /var/keys/nwcdcs.cfg ]; then
+	echo "use ipk config file: nwcdcs.cfg"
+	echo "rename /var/keys/nwcdcs.cfg.kbox > /var/keys/nwcdcs.cfg"
+	mv /var/keys/nwcdcs.cfg.kbox /var/keys/nwcdcs.cfg
+else
+	echo "found user config file: nwcdcs.cfg"
+	echo "skip ipk config file: nwcdcs.cfg.kbox"
+fi
+
 exit 0
Index: /ipk/source/emus_kbox_1_01pre24/CONTROL/postrm
===================================================================
--- /ipk/source/emus_kbox_1_01pre24/CONTROL/postrm	(revision 6662)
+++ /ipk/source/emus_kbox_1_01pre24/CONTROL/postrm	(revision 6663)
@@ -1,5 +1,5 @@
 #!/bin/sh
-TMP=/tmp/.kbox
-echo "successful removed"
+TMP=/tmp/.keys
+echo "successfully removed"
 echo "syncing disk"
 sync
@@ -9,3 +9,6 @@
 	echo new freespace size $FREE kb
 fi
+
+sync
+
 exit 0
Index: /ipk/source/emus_kbox_1_01pre24/CONTROL/preinst
===================================================================
--- /ipk/source/emus_kbox_1_01pre24/CONTROL/preinst	(revision 6662)
+++ /ipk/source/emus_kbox_1_01pre24/CONTROL/preinst	(revision 6663)
@@ -1,5 +1,5 @@
 #!/bin/sh
 #
-TMP=/tmp/.skin
+TMP=/tmp/.keys
 echo "syncing disk"
 sync
@@ -21,10 +21,10 @@
 	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
 	FREE=`expr $SPACE - 100`
-	SIZE=115
-	echo "check freespace"
+	SIZE=122
+	echo "checking freespace"
 	echo packege size $SIZE kb
 	echo freespace size $FREE kb
 	if  [ "$FREE" -lt "$SIZE" ]; then
-		echo "sorry no freespace on device"
+		echo "sorry no freespace left on device"
 		exit 1
 	else
@@ -32,7 +32,7 @@
 	fi
 fi   
-echo "install kbox ..."
+echo "installing kbox and configs..."
 echo "checking OS"
-if  [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then                      
+if  [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then
 	echo ---------------------------
 	echo DONT USE this IPK Package!!
@@ -42,3 +42,5 @@
 	exit 1
 fi
+
+sync
 exit 0
Index: /ipk/source/emus_kbox_1_01pre24/CONTROL/prerm
===================================================================
--- /ipk/source/emus_kbox_1_01pre24/CONTROL/prerm	(revision 6662)
+++ /ipk/source/emus_kbox_1_01pre24/CONTROL/prerm	(revision 6663)
@@ -1,4 +1,4 @@
 #!/bin/sh
-#
+TMP=/tmp/.keys
 echo "syncing disk"
 sync
@@ -8,16 +8,20 @@
 	echo freespace size $FREE kb
 fi
-echo "remove kbox"
+
 if [ ! -e /var/keys/cwshare.cfg.kbox ]; then
-	echo "rename cwshare.cfg -> cwshare.cfg.kbox"
-	mv /var/keys/cwshare.cfg /var/keys/cwshare.cfg.kbox
+	echo "remove ipk cwshare.cfg"
+	rm /var/keys/cwshare.cfg
 fi
+
 if [ ! -e /var/keys/kbox_cfg.kbox ]; then
-	echo "rename kbox_cfg -> kbox_cfg.kbox"
-	mv /var/keys/kbox_cfg /var/keys/kbox_cfg.kbox
+	echo "remove ipk kbox_cfg"
+	rm /var/keys/kbox_cfg
 fi
+
 if [ ! -e /var/keys/nwcdcs.cfg.kbox ]; then
-	echo "rename nwcdcs.cfg -> nwcdcs.cfg.kbox"
-	mv /var/keys/nwcdcs.cfg /var/keys/nwcdcs.cfg.kbox
+	echo "remove ipk nwcdcs.cfg"
+	rm /var/keys/nwcdcs.cfg
 fi
+
+echo "removing kbox and configs"
 exit 0
Index: /ipk/source/emus_kbox_1_01pre24/var/keys/cwshare.cfg
===================================================================
--- /ipk/source/emus_kbox_1_01pre24/var/keys/cwshare.cfg	(revision 6663)
+++ /ipk/source/emus_kbox_1_01pre24/var/keys/cwshare.cfg	(revision 6663)
@@ -0,0 +1,1 @@
+ 
Index: k/source/emus_kbox_1_01pre24/var/keys/cwshare.cfg.kbox
===================================================================
--- /ipk/source/emus_kbox_1_01pre24/var/keys/cwshare.cfg.kbox	(revision 6662)
+++ 	(revision )
@@ -1,1 +1,0 @@
- 
Index: /ipk/source/emus_kbox_1_01pre24/var/keys/kbox_cfg
===================================================================
--- /ipk/source/emus_kbox_1_01pre24/var/keys/kbox_cfg	(revision 6663)
+++ /ipk/source/emus_kbox_1_01pre24/var/keys/kbox_cfg	(revision 6663)
@@ -0,0 +1,192 @@
+# kbox config file
+
+# Number Of Tuners
+# xx ; xx=00 1 tuner (default)
+# xx ; xx=01 1 tuner
+# xx ; xx=02 2 tuners
+# xx ; xx=03 3 tuners
+N: { 01 }
+
+
+# Trace/Debug
+# xx yz ; xx=00 no konsole output
+# xx yz ; xx=01 konsole output
+# xx yz ; y=0 debug output (don't use)
+# xx yz ; y=1 no debug output
+# xx yz ; z=0 ouput to konsole
+# xx yz ; z=1 output to /var/tmp/debug.txt (not included yet!)
+# xx yz ; z=2 Output to UDP (to capture with gboxt)
+Z: { 01 12 } 192.168.1.11 8024
+
+# Task type (not included yet)
+#    00 **  normal mode gbox mode (no season, use Multicam instead)
+#    01 **  Season Emulation in a Irdeto allcam chid 0602 nonZ
+#    10 **  Season Emulation in a Irdeto allcam chid 1702 nonZ
+#    11 **  Season Emulation in a Irdeto allcam chid 1702 Z
+#    12 **  Season Emulation in a Irdeto allcam chid 1722 Z
+#    13 **  Season Emulation in a Irdeto allcam chid 1762 Z
+#    ** *1  Com port to use for season emulatiom (1 or 2)
+#    ** 0*  Use CTS f�r RST detection
+#    ** 1*  Use DCD f�r RST detection
+#    ** **   9600 = Baudrate to be used (working only on dbox2)
+#W: { 00 00 } 9600
+
+# gbox working mode
+#    00 pure Emu
+#    01 pure SoftCam (when card inside), Emu (when no card inside)
+#    02 pure Net Client
+#    03 Mixed mode !!!!! always use this !!!!!
+G: { 03 }
+
+# Display ECM messages on Konsole
+#    00 don't show any ECM's
+#    01 show only valid ECM's
+#    02 show valid and bad ECM's with complete data display
+C: { 00 }
+
+# Display EMM messages on Konsole
+#    *0 don't show any EMM's
+#    *1 show only valid EMM's
+#    *2 show valid and bad EMM's with complete data display
+#    1* Log any tier change on PW-Nagra-17xx cards into /var/keys/pwupdate.log
+M: { 00 }
+
+# AutoUpdate
+#    00 is ignored (default)
+#    01 enable AU
+#    02 Auto AU !!!!! always use this !!!!!
+A: { 02 }
+
+# Key update
+#    01 update only new keys, default setting
+#    02 update all keys (used for valid PMK checking)
+#U: { 01 }
+
+# Hash pids
+#    00 hash all pids, DO NOT USE THIS OPTION, IT IS ONLY FOR TESTING STUFF
+#    01 hash only pids with implemented algos and available keys !!!!! always use this !!!!!
+H: { 01 }
+
+# Key files folder
+#    00 keyfiles in /var/keys
+#    01 keyfiles in /var/tmp
+T: { 00 }
+
+# On Screen Display for the Multysystemcam on com1/com2
+#    00 No OSD (default)
+#    01 display Smartcard messages in Neutrino
+#    02 display Smartcard messages in Neutrino new nhttpd format
+#    03 display Smartcard messages in Enigma
+#                      mypass (use user=root and pass=mypass for nhttpd)
+O: { 01 } 192.168.1.51
+
+# Logger and NET-mode UDP port Init (not included yet)
+#    00 do not init UDP port
+#    01 Init UDP port for IP, port, UDP
+#L: { 00 } 192.168.1.29 8017
+
+# demux, multicam/comport configuration
+# *x ** ; x = device nummber to be used (0= default)
+# D* ** ; force use of /proc/bus/gtx for cw write operations
+          (in the dbox2 the gbox writes directly the CW's, 00 is the
+           recommended mode ! No drivers are required) use D* ** ONLY if
+           you have Problems. 0* ** should be prefered !!!
+# F* ** ; write CW's in both devices (used for PVR in STB04xxx devices)
+# ** y* ; y=0001b (0x1*) use slot1 as Multicam (only on STB04xxx)
+# ** y* ; y=0010b (0x2*) use slot2 as Multicam (only on STB04xxx)
+# ** y* ; y=0011b (0x3*) use slot1 and slot2 as Multicams (only on STB04xxx)
+# ** *z ; z=0001b (0x*1) use com1 as Multicam
+# ** *z ; z=0010b (0x*2) use com2 as Multicam
+# ** *z ; z=0011b (0x*3) use com1 and com2 as Multicams
+# ** yz ; yz=00110011b (0x33) use slot1+slot2+com1+com2 as Multicams
+# ** *z ; z=0100b (0x*4) invert CTS detection on com1
+# ** *z ; z=1000b (0x*8) invert CTS detection on com2
+# example: yz = 0x0A = 00001010 (use com2 with inverted CTS detection line)
+V: { 00 01 }
+
+# RS232 SSSP mode (not included yet)
+#    x    debug messages, 1=on, 0=off
+#     y   com port to use (0=none, 1=com1, 2=com2)
+#R: { 00 }
+
+# =============================================================================
+# extra options to override default seting in case you expirience Problems,
+# normaly these setings are not required.
+#
+# cpu, api, cw write method (not included yet)
+#
+#     00 auto
+#     01 80X86
+#     02 MPC823
+#     03 IBM STB04xxx
+#     04 SuperH4
+#        00 auto
+#        01 ibm
+#        02 api2
+#        03 api3
+#           00 cw write style = use internal routine (only dbox2)
+#           01 cw write style = CA_SET_DESCR type1 (dbox2, vdr)
+#           02 cw write style = CA_SET_DESCR type2
+#           03 cw write style = CA_SET_DESCR type3
+#           04 cw write style = 16 byte /proc/bus/gtx
+#           05 cw write style = 4096 byte /proc/bus/gtx, cw offset=0x04D0
+#              xx write cw in 1st device with index=xx
+#                 yy write cw in 2nd device with index=yy
+#                      01 means with .index=0 (default)
+#                      02 means with .index=1
+#                      03 means with .index=0 and .index=1
+#                      .. any bitwise combination ...
+#                      FF means with all 8 indexes (0-7)
+#J: { 01 00 00 01 01 }
+
+# Files, folders, devices
+#          folder/device             comment
+#
+#F: { 01 } /var/tmp/pmt.tmp          // pmt file
+#F: { 02 } /var/tmp/emm.info         // key update log file
+#F: { 03 } /var/tmp/ecm.info         // ecm info file
+#F: { 04 } /var/tmp/atack.txt        // atack info file
+#F: { 11 } /var/keys                 // folder for config files
+#F: { 12 } /var/tmp                  // folder for temporary file
+#F: { 13 } /var/tmp                  // folder for keyfiles
+#F: { 21 } /dev/dvb/adapter0/ca0     // ca device
+#F: { 22 } /dev/dvb/adapter0/dvr0    // dvr device
+#F: { 23 } /dev/dvb/adapter0/demux0  // demux device
+#F: { 31 } /dev/dvb/adapter0/ca1     // second ca device to write cw's (recording)
+#F: { 41 } /dev/sci0                 // STB04xxx slot1
+#F: { 42 } /dev/sci1                 // STB04xxx slot1
+#F: { 43 } /dev/tts/0                // rs232 com1
+#F: { 44 } /dev/tts/1                // rs232 com2
+
+# For overclocking freaks, Clocking internal STB04xxx slots with:
+# 1=7.80MHz 2=6.30MHz 3=5.25MHz 4=4.50MHz 5=3.94MHz 6=3.50MHz 7=3.15MHz
+# Irdeto works fine on 7.8MHz, all other fine on 6.30MHz or 5.25MHz
+# The Dream has not a clean clock signal, some cards that are sensitive will
+# refuse to work even on 3.5MHz, thats why 3.15MHz is the default value there.
+# On other STB04xxx recievers the same cards work with 6.30MHz
+#
+#F: { 51 } 02                        // irdeto
+#F: { 52 } 03                        // seca
+#F: { 53 } 03                        // viaccess
+#F: { 54 } 03                        // nagra
+#F: { 55 } 03                        // crypto
+#F: { 57 } 03                        // conax
+#F: { 58 } 03                        // nds
+
+# force a name change of the season or sssp rs232 device
+#F: { 45 } /dev/ttyS1
+
+# set stay alive ping time in seconds (default is 300)
+#F: { A0 } 300
+
+
+# disable direct serial port I/O access on 80x86cpus (win and linux)
+# direct port i/o is used to set unusual Baudrates, if you want to
+# a 3.579MHz card in a 6.000MHz reader etc ...
+#
+# Enabled (A1=0) is the default setting, has always been !!!
+#
+# Disable (set to 1) it ONLY if you have problems with ioperm or you want
+# to use a usb-to-rs232 smartcard reader
+#
+#F: { A1 } 0
Index: k/source/emus_kbox_1_01pre24/var/keys/kbox_cfg.kbox
===================================================================
--- /ipk/source/emus_kbox_1_01pre24/var/keys/kbox_cfg.kbox	(revision 6662)
+++ 	(revision )
@@ -1,192 +1,0 @@
-# kbox config file
-
-# Number Of Tuners
-# xx ; xx=00 1 tuner (default)
-# xx ; xx=01 1 tuner
-# xx ; xx=02 2 tuners
-# xx ; xx=03 3 tuners
-N: { 01 }
-
-
-# Trace/Debug
-# xx yz ; xx=00 no konsole output
-# xx yz ; xx=01 konsole output
-# xx yz ; y=0 debug output (don't use)
-# xx yz ; y=1 no debug output
-# xx yz ; z=0 ouput to konsole
-# xx yz ; z=1 output to /var/tmp/debug.txt (not included yet!)
-# xx yz ; z=2 Output to UDP (to capture with gboxt)
-Z: { 01 12 } 192.168.1.11 8024
-
-# Task type (not included yet)
-#    00 **  normal mode gbox mode (no season, use Multicam instead)
-#    01 **  Season Emulation in a Irdeto allcam chid 0602 nonZ
-#    10 **  Season Emulation in a Irdeto allcam chid 1702 nonZ
-#    11 **  Season Emulation in a Irdeto allcam chid 1702 Z
-#    12 **  Season Emulation in a Irdeto allcam chid 1722 Z
-#    13 **  Season Emulation in a Irdeto allcam chid 1762 Z
-#    ** *1  Com port to use for season emulatiom (1 or 2)
-#    ** 0*  Use CTS f�r RST detection
-#    ** 1*  Use DCD f�r RST detection
-#    ** **   9600 = Baudrate to be used (working only on dbox2)
-#W: { 00 00 } 9600
-
-# gbox working mode
-#    00 pure Emu
-#    01 pure SoftCam (when card inside), Emu (when no card inside)
-#    02 pure Net Client
-#    03 Mixed mode !!!!! always use this !!!!!
-G: { 03 }
-
-# Display ECM messages on Konsole
-#    00 don't show any ECM's
-#    01 show only valid ECM's
-#    02 show valid and bad ECM's with complete data display
-C: { 00 }
-
-# Display EMM messages on Konsole
-#    *0 don't show any EMM's
-#    *1 show only valid EMM's
-#    *2 show valid and bad EMM's with complete data display
-#    1* Log any tier change on PW-Nagra-17xx cards into /var/keys/pwupdate.log
-M: { 00 }
-
-# AutoUpdate
-#    00 is ignored (default)
-#    01 enable AU
-#    02 Auto AU !!!!! always use this !!!!!
-A: { 02 }
-
-# Key update
-#    01 update only new keys, default setting
-#    02 update all keys (used for valid PMK checking)
-#U: { 01 }
-
-# Hash pids
-#    00 hash all pids, DO NOT USE THIS OPTION, IT IS ONLY FOR TESTING STUFF
-#    01 hash only pids with implemented algos and available keys !!!!! always use this !!!!!
-H: { 01 }
-
-# Key files folder
-#    00 keyfiles in /var/keys
-#    01 keyfiles in /var/tmp
-T: { 00 }
-
-# On Screen Display for the Multysystemcam on com1/com2
-#    00 No OSD (default)
-#    01 display Smartcard messages in Neutrino
-#    02 display Smartcard messages in Neutrino new nhttpd format
-#    03 display Smartcard messages in Enigma
-#                      mypass (use user=root and pass=mypass for nhttpd)
-O: { 01 } 192.168.1.51
-
-# Logger and NET-mode UDP port Init (not included yet)
-#    00 do not init UDP port
-#    01 Init UDP port for IP, port, UDP
-#L: { 00 } 192.168.1.29 8017
-
-# demux, multicam/comport configuration
-# *x ** ; x = device nummber to be used (0= default)
-# D* ** ; force use of /proc/bus/gtx for cw write operations
-          (in the dbox2 the gbox writes directly the CW's, 00 is the
-           recommended mode ! No drivers are required) use D* ** ONLY if
-           you have Problems. 0* ** should be prefered !!!
-# F* ** ; write CW's in both devices (used for PVR in STB04xxx devices)
-# ** y* ; y=0001b (0x1*) use slot1 as Multicam (only on STB04xxx)
-# ** y* ; y=0010b (0x2*) use slot2 as Multicam (only on STB04xxx)
-# ** y* ; y=0011b (0x3*) use slot1 and slot2 as Multicams (only on STB04xxx)
-# ** *z ; z=0001b (0x*1) use com1 as Multicam
-# ** *z ; z=0010b (0x*2) use com2 as Multicam
-# ** *z ; z=0011b (0x*3) use com1 and com2 as Multicams
-# ** yz ; yz=00110011b (0x33) use slot1+slot2+com1+com2 as Multicams
-# ** *z ; z=0100b (0x*4) invert CTS detection on com1
-# ** *z ; z=1000b (0x*8) invert CTS detection on com2
-# example: yz = 0x0A = 00001010 (use com2 with inverted CTS detection line)
-V: { 00 01 }
-
-# RS232 SSSP mode (not included yet)
-#    x    debug messages, 1=on, 0=off
-#     y   com port to use (0=none, 1=com1, 2=com2)
-#R: { 00 }
-
-# =============================================================================
-# extra options to override default seting in case you expirience Problems,
-# normaly these setings are not required.
-#
-# cpu, api, cw write method (not included yet)
-#
-#     00 auto
-#     01 80X86
-#     02 MPC823
-#     03 IBM STB04xxx
-#     04 SuperH4
-#        00 auto
-#        01 ibm
-#        02 api2
-#        03 api3
-#           00 cw write style = use internal routine (only dbox2)
-#           01 cw write style = CA_SET_DESCR type1 (dbox2, vdr)
-#           02 cw write style = CA_SET_DESCR type2
-#           03 cw write style = CA_SET_DESCR type3
-#           04 cw write style = 16 byte /proc/bus/gtx
-#           05 cw write style = 4096 byte /proc/bus/gtx, cw offset=0x04D0
-#              xx write cw in 1st device with index=xx
-#                 yy write cw in 2nd device with index=yy
-#                      01 means with .index=0 (default)
-#                      02 means with .index=1
-#                      03 means with .index=0 and .index=1
-#                      .. any bitwise combination ...
-#                      FF means with all 8 indexes (0-7)
-#J: { 01 00 00 01 01 }
-
-# Files, folders, devices
-#          folder/device             comment
-#
-#F: { 01 } /var/tmp/pmt.tmp          // pmt file
-#F: { 02 } /var/tmp/emm.info         // key update log file
-#F: { 03 } /var/tmp/ecm.info         // ecm info file
-#F: { 04 } /var/tmp/atack.txt        // atack info file
-#F: { 11 } /var/keys                 // folder for config files
-#F: { 12 } /var/tmp                  // folder for temporary file
-#F: { 13 } /var/tmp                  // folder for keyfiles
-#F: { 21 } /dev/dvb/adapter0/ca0     // ca device
-#F: { 22 } /dev/dvb/adapter0/dvr0    // dvr device
-#F: { 23 } /dev/dvb/adapter0/demux0  // demux device
-#F: { 31 } /dev/dvb/adapter0/ca1     // second ca device to write cw's (recording)
-#F: { 41 } /dev/sci0                 // STB04xxx slot1
-#F: { 42 } /dev/sci1                 // STB04xxx slot1
-#F: { 43 } /dev/tts/0                // rs232 com1
-#F: { 44 } /dev/tts/1                // rs232 com2
-
-# For overclocking freaks, Clocking internal STB04xxx slots with:
-# 1=7.80MHz 2=6.30MHz 3=5.25MHz 4=4.50MHz 5=3.94MHz 6=3.50MHz 7=3.15MHz
-# Irdeto works fine on 7.8MHz, all other fine on 6.30MHz or 5.25MHz
-# The Dream has not a clean clock signal, some cards that are sensitive will
-# refuse to work even on 3.5MHz, thats why 3.15MHz is the default value there.
-# On other STB04xxx recievers the same cards work with 6.30MHz
-#
-#F: { 51 } 02                        // irdeto
-#F: { 52 } 03                        // seca
-#F: { 53 } 03                        // viaccess
-#F: { 54 } 03                        // nagra
-#F: { 55 } 03                        // crypto
-#F: { 57 } 03                        // conax
-#F: { 58 } 03                        // nds
-
-# force a name change of the season or sssp rs232 device
-#F: { 45 } /dev/ttyS1
-
-# set stay alive ping time in seconds (default is 300)
-#F: { A0 } 300
-
-
-# disable direct serial port I/O access on 80x86cpus (win and linux)
-# direct port i/o is used to set unusual Baudrates, if you want to
-# a 3.579MHz card in a 6.000MHz reader etc ...
-#
-# Enabled (A1=0) is the default setting, has always been !!!
-#
-# Disable (set to 1) it ONLY if you have problems with ioperm or you want
-# to use a usb-to-rs232 smartcard reader
-#
-#F: { A1 } 0
Index: /ipk/source/emus_kbox_1_01pre24/var/keys/nwcdcs.cfg
===================================================================
--- /ipk/source/emus_kbox_1_01pre24/var/keys/nwcdcs.cfg	(revision 6663)
+++ /ipk/source/emus_kbox_1_01pre24/var/keys/nwcdcs.cfg	(revision 6663)
@@ -0,0 +1,23 @@
+#newcamd sharing configuration
+
+# Options
+#    print infos/errors
+#    |  print Hello
+#    |  |  print ecm/cw
+#    |  |  |  print CW's
+#    |  |  |  |  try to reconnect imidiatly after lost connection
+#    |  |  |  |  |  print on screen
+#    |  |  |  |  |  |  print into debug.txt
+#    |  |  |  |  |  |  |  on callback reconnect after 30 seconds
+#    |  |  |  |  |  |  |  |  on login failed, retry afer 5 seconds (only 1 time)
+#    |  |  |  |  |  |  |  |  |  try to connect to unconnected server every hour (3600 seconds)
+#    |  |  |  |  |  |  |  |  |  |    minimum time distance (in seconds) between login's (force login delay)
+#    |  |  |  |  |  |  |  |  |  |    |  keep internet alive every 360 seconds
+#    |  |  |  |  |  |  |  |  |  |    |  |   ping cardservers (keep alive) every 360 after last activity
+#    |  |  |  |  |  |  |  |  |  |    |  |   |   connect timeout
+P: { 01 00 01 00 01 01 01 30 05 3600 05 360 360 1 }
+
+#    name  dns/ip        port  user   pass    callback configkey
+C: { dbox2 192.168.0.104 10001 myname passwo1 12000 01 02 03 04 05 06 07 08 09 10 11 12 13 14 }
+C: { dbox2 192.168.0.104 10002 myname passwo1 12000 01 02 03 04 05 06 07 08 09 10 11 12 13 14 }
+C: { hdbox mee.homeip.net 6008 other1 mypassword 13000 11 22 33 44 55 66 77 88 99 10 11 12 13 14 } 
Index: k/source/emus_kbox_1_01pre24/var/keys/nwcdcs.cfg.kbox
===================================================================
--- /ipk/source/emus_kbox_1_01pre24/var/keys/nwcdcs.cfg.kbox	(revision 6662)
+++ 	(revision )
@@ -1,23 +1,0 @@
-#newcamd sharing configuration
-
-# Options
-#    print infos/errors
-#    |  print Hello
-#    |  |  print ecm/cw
-#    |  |  |  print CW's
-#    |  |  |  |  try to reconnect imidiatly after lost connection
-#    |  |  |  |  |  print on screen
-#    |  |  |  |  |  |  print into debug.txt
-#    |  |  |  |  |  |  |  on callback reconnect after 30 seconds
-#    |  |  |  |  |  |  |  |  on login failed, retry afer 5 seconds (only 1 time)
-#    |  |  |  |  |  |  |  |  |  try to connect to unconnected server every hour (3600 seconds)
-#    |  |  |  |  |  |  |  |  |  |    minimum time distance (in seconds) between login's (force login delay)
-#    |  |  |  |  |  |  |  |  |  |    |  keep internet alive every 360 seconds
-#    |  |  |  |  |  |  |  |  |  |    |  |   ping cardservers (keep alive) every 360 after last activity
-#    |  |  |  |  |  |  |  |  |  |    |  |   |   connect timeout
-P: { 01 00 01 00 01 01 01 30 05 3600 05 360 360 1 }
-
-#    name  dns/ip        port  user   pass    callback configkey
-C: { dbox2 192.168.0.104 10001 myname passwo1 12000 01 02 03 04 05 06 07 08 09 10 11 12 13 14 }
-C: { dbox2 192.168.0.104 10002 myname passwo1 12000 01 02 03 04 05 06 07 08 09 10 11 12 13 14 }
-C: { hdbox mee.homeip.net 6008 other1 mypassword 13000 11 22 33 44 55 66 77 88 99 10 11 12 13 14 } 
Index: /ipk/source/emus_mbox0.6_0010/CONTROL/postinst
===================================================================
--- /ipk/source/emus_mbox0.6_0010/CONTROL/postinst	(revision 6662)
+++ /ipk/source/emus_mbox0.6_0010/CONTROL/postinst	(revision 6663)
@@ -1,14 +1,7 @@
 #!/bin/sh
-TMP=/tmp/.mbox
-PLUGINDIR=/var/emu
+TMP=/tmp/.keys
+PLUGINDIR=/var/keys
+PLUGINDIR=/var/bin
 CONFIGDIR=/var/etc
-if [ ! -e /var/keys/cwshare.cfg ]; then
-	echo "renaming cwshare.cfg.mbox -> cwshare.cfg"
-	mv /var/keys/cwshare.cfg.mbox /var/keys/cwshare.cfg
-fi
-if [ ! -e /var/keys/mbox.cfg ]; then
-	echo "rename mbox.cfg.mbox -> mbox.cfg"
-	mv /var/keys/mbox.cfg.mbox /var/keys/mbox.cfg
-fi
 echo "successfully installed"
 echo "syncing disk"
@@ -19,3 +12,40 @@
 	echo new freespace size $FREE kb
 fi
+
+if [ ! -e /var/keys/add.data ]; then
+	echo "use ipk config file: add.data"
+	echo "rename /var/keys/add.data.mbox > /var/keys/add.data"
+	mv /var/keys/add.data.mbox /var/keys/add.data
+else
+	echo "found user config file: add.data"
+	echo "skip ipk config file: add.data.mbox"
+fi
+
+if [ ! -e /var/keys/mbox.cfg ]; then
+	echo "use ipk config file: mbox.cfg"
+	echo "rename /var/keys/mbox.cfg.mbox > /var/keys/mbox.cfg"
+	mv /var/keys/mbox.cfg.mbox /var/keys/mbox.cfg
+else
+	echo "found user config file: mbox.cfg"
+	echo "skip ipk config file: mbox.cfg.mbox"
+fi
+
+if [ ! -e /var/keys/cwshare.cfg ]; then
+	echo "use ipk config file: cwshare.cfg"
+	echo "rename /var/keys/cwshare.cfg.mbox > /var/keys/cwshare.cfg"
+	mv /var/keys/cwshare.cfg.mbox /var/keys/cwshare.cfg
+else
+	echo "found user config file: cwshare.cfg"
+	echo "skip ipk config file: cwshare.cfg.mbox"
+fi
+
+if [ ! -e /var/keys/port.list ]; then
+	echo "use ipk config file: port.list"
+	echo "rename /var/keys/port.list.mbox > /var/keys/port.list"
+	mv /var/keys/port.list.mbox /var/keys/port.list
+else
+	echo "found user config file: port.list"
+	echo "skip ipk config file: port.list.mbox"
+fi
+
 exit 0
Index: /ipk/source/emus_mbox0.6_0010/CONTROL/postrm
===================================================================
--- /ipk/source/emus_mbox0.6_0010/CONTROL/postrm	(revision 6662)
+++ /ipk/source/emus_mbox0.6_0010/CONTROL/postrm	(revision 6663)
@@ -1,4 +1,4 @@
 #!/bin/sh
-TMP=/tmp/.mbox
+TMP=/tmp/.keys
 echo "successfully removed"
 echo "syncing disk"
@@ -9,3 +9,6 @@
 	echo new freespace size $FREE kb
 fi
-exit 0
+
+sync
+
+exit
Index: /ipk/source/emus_mbox0.6_0010/CONTROL/preinst
===================================================================
--- /ipk/source/emus_mbox0.6_0010/CONTROL/preinst	(revision 6662)
+++ /ipk/source/emus_mbox0.6_0010/CONTROL/preinst	(revision 6663)
@@ -1,5 +1,5 @@
 #!/bin/sh
 #
-TMP=/tmp/.mbox
+TMP=/tmp/.keys
 echo "syncing disk"
 sync
@@ -21,5 +21,5 @@
 	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
 	FREE=`expr $SPACE - 100`
-	SIZE=172
+	SIZE=122
 	echo "checking freespace"
 	echo packege size $SIZE kb
@@ -32,7 +32,7 @@
 	fi
 fi   
-echo "installing mbox ..."
+echo "installing mbox and configs..."
 echo "checking OS"
-if  [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then                      
+if  [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then
 	echo ---------------------------
 	echo DONT USE this IPK Package!!
@@ -42,3 +42,5 @@
 	exit 1
 fi
+
+sync
 exit 0
Index: /ipk/source/emus_mbox0.6_0010/CONTROL/prerm
===================================================================
--- /ipk/source/emus_mbox0.6_0010/CONTROL/prerm	(revision 6662)
+++ /ipk/source/emus_mbox0.6_0010/CONTROL/prerm	(revision 6663)
@@ -1,4 +1,4 @@
 #!/bin/sh
-#
+TMP=/tmp/.keys
 echo "syncing disk"
 sync
@@ -8,12 +8,41 @@
 	echo freespace size $FREE kb
 fi
+
+if [ ! -e /var/keys/oscam.conf.oscam ]; then
+	echo "remove ipk oscam.conf"
+	rm /var/keys/oscam.conf
+fi
+
+if [ ! -e /var/keys/oscam.provid.oscam ]; then
+	echo "remove ipk oscam.provid"
+	rm /var/keys/oscam.provid
+fi
+
+if [ ! -e /var/keys/oscam.srvid.oscam ]; then
+	echo "remove ipk oscam.srvid"
+	rm /var/keys/oscam.srvid
+fi
+
+if [ ! -e /var/keys/add.data.mbox ]; then
+	echo "remove ipk add.data"
+	rm /var/keys/add.data
+fi
+
 if [ ! -e /var/keys/cwshare.cfg.mbox ]; then
-	echo "renaming cwshare.cfg -\> cwshare.cfg.mbox"
-	mv /var/keys/cwshare.cfg /var/keys/cwshare.cfg.mbox
+	echo "remove ipk cwshare.cfg"
+	rm /var/keys/cwshare.cfg
 fi
+
 if [ ! -e /var/keys/mbox.cfg.mbox ]; then
-	echo "renaming mbox.cfg -\> mbox.cfg.mbox"
-	mv /var/keys/mbox.cfg /var/keys/mbox.cfg.mbox
+	echo "remove ipk mbox.cfg"
+	rm /var/keys/mbox.cfg
 fi
-echo "removing mbox"
+
+if [ ! -e /var/keys/port.list.mbox ]; then
+	echo "remove ipk port.list"
+	rm /var/keys/port.list
+fi
+
+echo "removing mbox and configs"
 exit 0
+
Index: /ipk/source/emus_mbox0.6_0010/var/keys/cwshare.cfg
===================================================================
--- /ipk/source/emus_mbox0.6_0010/var/keys/cwshare.cfg	(revision 6663)
+++ /ipk/source/emus_mbox0.6_0010/var/keys/cwshare.cfg	(revision 6663)
@@ -0,0 +1,54 @@
+# allow maximum 06 share level for recieved card data
+I: { 05 }
+
+#    01 repeat EMM's
+#    00 consider every EMM only once
+#       01 restart pid on overflow
+#          1* reset ENX on every channel change
+#          *1 check/reset ENX freezes on FTA
+#          *2 check/reset ENX freezes on PayTV
+#          *3 check/reset ENX freezes on FTA and PayTV
+#             00 write nothing in atack.txt
+#             01 write into atack.txt: password is wrong
+#             02 write into atack.txt: ID unknown
+#             04 write into atack.txt: IP is wrong
+#             08 write into atack.txt: port is worng
+#             10 write into atack.txt: share.stat
+#             20 create online.log for online/offline logging
+#             3F write everything. (combine bits for other combinations)
+#                4000 send ecm again after 4 Seconds if no reply.
+#                     6000 resync decode after 6 Seconds if net decode failed
+N: { 00 01 03 1F 4000 6000 }
+
+# Send ECM's at maximum 5 cards (please use this as default)
+X: { 10 }
+
+# Send ECM's in any case to these card ID's, even they are more then X:
+# some examples ...
+#G: { 17020000 1235 }
+
+
+O: { 4000 2000 }
+
+# For W: please read the cwshare.txt, here only some examples
+# use card 1 only for the following pids
+#W: { 01 02 02 } 1022 100A 100B 102B 1009 101D 1029 1014 1011 101B
+# don't use card 2 for the following pids
+#W: { 02 03 03 } 1008 1016
+
+# S: is the same as W:, just using the SID instead of the ECMPID
+
+# cwshare.cfg --- ufs910 --- internet and local network
+#
+#                            password
+M: { 192.168.0.25    { 20000000 }}
+#M: { my2ndufs910.homedns.net    { BC242456 }}
+
+#    Internet Friends       port range   password   cod
+#G: { friend1.homeip.net    { 8010 8010 { B142AB11 { 5 5 }}}}
+#G: { friend2.homelinux.net { 8010 8010 { 81BFF901 { 5 5 }}}}
+
+#    other local boxes
+G: { 192.168.0.17          { 2499 2499 { 20000001 { 5 5 }}}}
+#G: { 192.168.0.52          { 8020 8020 { BA334B24 { 5 5 }}}}
+#G: { 192.168.1.11          { 2499 2499 { BA334B24 { 5 5 }}}}
Index: k/source/emus_mbox0.6_0010/var/keys/cwshare.cfg.mbox
===================================================================
--- /ipk/source/emus_mbox0.6_0010/var/keys/cwshare.cfg.mbox	(revision 6662)
+++ 	(revision )
@@ -1,54 +1,0 @@
-# allow maximum 06 share level for recieved card data
-I: { 05 }
-
-#    01 repeat EMM's
-#    00 consider every EMM only once
-#       01 restart pid on overflow
-#          1* reset ENX on every channel change
-#          *1 check/reset ENX freezes on FTA
-#          *2 check/reset ENX freezes on PayTV
-#          *3 check/reset ENX freezes on FTA and PayTV
-#             00 write nothing in atack.txt
-#             01 write into atack.txt: password is wrong
-#             02 write into atack.txt: ID unknown
-#             04 write into atack.txt: IP is wrong
-#             08 write into atack.txt: port is worng
-#             10 write into atack.txt: share.stat
-#             20 create online.log for online/offline logging
-#             3F write everything. (combine bits for other combinations)
-#                4000 send ecm again after 4 Seconds if no reply.
-#                     6000 resync decode after 6 Seconds if net decode failed
-N: { 00 01 03 1F 4000 6000 }
-
-# Send ECM's at maximum 5 cards (please use this as default)
-X: { 10 }
-
-# Send ECM's in any case to these card ID's, even they are more then X:
-# some examples ...
-#G: { 17020000 1235 }
-
-
-O: { 4000 2000 }
-
-# For W: please read the cwshare.txt, here only some examples
-# use card 1 only for the following pids
-#W: { 01 02 02 } 1022 100A 100B 102B 1009 101D 1029 1014 1011 101B
-# don't use card 2 for the following pids
-#W: { 02 03 03 } 1008 1016
-
-# S: is the same as W:, just using the SID instead of the ECMPID
-
-# cwshare.cfg --- ufs910 --- internet and local network
-#
-#                            password
-M: { 192.168.0.25    { 20000000 }}
-#M: { my2ndufs910.homedns.net    { BC242456 }}
-
-#    Internet Friends       port range   password   cod
-#G: { friend1.homeip.net    { 8010 8010 { B142AB11 { 5 5 }}}}
-#G: { friend2.homelinux.net { 8010 8010 { 81BFF901 { 5 5 }}}}
-
-#    other local boxes
-G: { 192.168.0.17          { 2499 2499 { 20000001 { 5 5 }}}}
-#G: { 192.168.0.52          { 8020 8020 { BA334B24 { 5 5 }}}}
-#G: { 192.168.1.11          { 2499 2499 { BA334B24 { 5 5 }}}}
Index: /ipk/source/emus_mbox0.6_0010/var/keys/mbox.cfg
===================================================================
--- /ipk/source/emus_mbox0.6_0010/var/keys/mbox.cfg	(revision 6663)
+++ /ipk/source/emus_mbox0.6_0010/var/keys/mbox.cfg	(revision 6663)
@@ -0,0 +1,267 @@
+
+
+//mbox.cfg EXPLANATION and EXAMPLES
+
+
+A: { 0 } // for QBoxHD receivers or for any receivers if needed it
+//A: { x }
+//Choose adapter path
+//x=0 -> /dev/dvb/adapter0/
+//x=1 -> /dev/dvb/adapter1/
+//x=2 -> /dev/dvb/adapter2/
+//x=.. -> .......
+//default x=0
+
+
+/************************************************************************************************************************/
+
+D: { 4 }
+
+//D: { x }
+//x=0 -> disable
+//x=1 -> enable dbox2 cw writing
+//x=2 -> enable STAPI for IPBOX
+//x=3 -> enable STAPI for Kathrein
+//x=4 -> enable Linux DVB API for Kathrein
+//x=5 -> enable triple dragon
+//x=6 -> enable Qbox HD
+//x=7 -> enable STAPI for Kathrein ufs922 -> dont work CSA decoding :(
+//default disabled
+
+/************************************************************************************************************************/
+
+B: { 0 0 0 }
+
+//B: { 1 127.0.0.1 127.0.0.1 } // for local watching over DVB
+
+
+//B: { x IP_listen IP_send }
+//x=0 -> disable local UDP ports 8004-80xx ,this ports are used with DVB cards and gbox plugin (Windows and Linux)
+//x=1 -> enable
+//IP_listen -> on what IP to wait for PMT and ECMs
+//IP_send -> on what IP to send DCW
+//default disabled
+
+/************************************************************************************************************************/
+
+
+Z: { 12 01 } { 127.0.0.1 8000 }
+
+//  Z option -> control sending/writing current informations
+//  Z: { xy 0z } { IP port }
+//   x=0 -> don't print time stamp (in console screen and in debug file)
+//   x=1 -> print time stamp ( .... )
+//   y=0 -> no writing/sending informations to debug file/destination IP
+//   y=1 -> send informations to destination IP but not in debug file
+//   y=2 -> write informations to debug file but don't send to destination IP
+//   y=3 -> write/send informations to debug file/destination IP
+//   z=0 -> dont write debug text in console window
+//   z=1 -> write debug text in console windows
+//   IP port -> destination IP and UDP port where to send informations
+//  no default
+
+/************************************************************************************************************************/
+
+#C: { 127.0.0.1 7999 }
+
+// C option -> control receiving some command messages localy or from another IP
+// C: { IP port }
+// IP-> your local IP or you DNS
+// port -> on what port you will be waiting command messages
+// no default
+
+/************************************************************************************************************************/
+
+
+U: { 1 }
+
+// U options -> Update peer(s) IP if it changes while peer still resending ecm's/cw etc.. information
+// default only on hello message peer(s) IP are updated !!!
+// U: { x }
+// x=0 -> disabled
+// x=1 -> enabled
+// default disabled
+
+/************************************************************************************************************************/
+
+L: { 1 }
+
+// L option -> how mbox to menage virtual card(s) with level 0
+// ( only for peer(s) who have and can reshare virtual cards but don't want to use LEVEL 0 card(s) for them self)
+// L: { x }
+// x=0 -> don't load any virtual cards with LEVEL 0, you can't use them for your self
+// x=1 -> load all virtual cards with LEVEL 0 ,you will be using them for your self
+// default 1
+
+/************************************************************************************************************************/
+
+#G: { /hdd/ }
+
+//G option -> redirect writing ONLY debug.txt file to internal or external HDD in receivers or for any other reason.
+//Remove #, ONLY if you want to use this option !!!!!!!
+
+/************************************************************************************************************************/
+
+T: { /tmp/ }
+
+// T option -> where to store temp files ... (share.info,debug.txt ,etc.)
+// T: { folder_path_to_files, example: T: { /tmp/ } }
+
+/************************************************************************************************************************/
+
+K: { /var/keys/ }
+
+// K option -> where is cwshare.cfg,mbox.prio file
+// K: { folder_path_to_files, example: K: { /var/keys/ } }
+
+
+/************************************************************************************************************************/
+
+
+M: { 1 }
+
+// M option -> Mode option
+// M: { x }
+// x=0 -> local mode no NET
+// x=1 -> NET mode
+// default 0
+
+/************************************************************************************************************************/
+
+
+P: { 2/tmp/camd.socket }
+
+
+// P option -> PMT location (Dont used with linux and windows)
+// you must be tuned to channel so image can generate this file
+// { /tmp/pmt.tmp } for receivers and images that create this file <- use this if you can
+// { /tmp/pmtX.tmp } X-> number -> pmt1.tmp ......
+// { 1/tmp/camd.socket } for enigma 1
+// { 2/tmp/camd.socket } for enigma 2
+
+/************************************************************************************************************************/
+
+W: { 0 }
+
+// W option -> write raw ECM to ecm.raw file
+// W: { x }
+// x=0 -> disabled
+// x=1 -> enabled
+// default disabled
+
+/************************************************************************************************************************/
+
+Q: { 300 }
+
+//Q option -> newcamd connect retry in sec.
+//Q: { x }
+// default 300 sec.
+
+/************************************************************************************************************************/
+
+F: { 500 }
+
+//F option -> reset writing debug.txt from begining if file size is higher then (x)(KB)
+//F { x } -> decimal in KBytes
+//default 500 KB
+
+
+/************************************************************************************************************************/
+
+//V: { card_type | device number | clock | inverse_Reset | inverse_CD_Line | detect card over CTS | DM800/8000 | dbox }
+#V: { 3 1 3571200 0 0 0 0 0 } // external reader example -> Seca card, com1 port, clock 3.57 Mhz,
+#V: { 3 2 3571200 1 0 0 0 0 }
+#V: { 3 3 1 0 0 0 0 0 } // dreambox example -> Seca card,sci0 slot,3.33 Mhz
+
+
+// [card_type]:
+// Seca 3
+// Irdeto 4
+// Conax 5
+// Cryptoworks 6
+// Viaccess 7
+// NDS 8
+// Nagravision 9
+
+
+
+// [device number]:
+// COM1/ttyS0 1
+// COM2/ttyS1 2
+// /dev/sci0  3
+// /dev/sci1  4
+// /dev/usb/tts/0  5
+// /dev/usb/tts/1  6
+// /dev/tts/0  7
+// /dev/tts/1  8
+// /dev/ttyUSB0 9
+// /dev/ttyUSB1 10
+// /dev/scard0 11 //azbox
+// /dev/scard1 12 //azbox
+
+
+
+//[clocks]
+//for COM ports and external card readers in Hz!!!
+
+//for SCI DreamBox slots use this values
+// 1 - 3.33 Mhz
+// 2 - 3.63 Mhz
+// 3 - 4 Mhz
+// 4 - 4.44 Mhz
+// 5 - 5Mhz
+// 6 - 5.71 Mhz
+// 7 - 6.66 Mhz
+// 8 - 8 Mhz
+
+//[Inverse Reset]
+// 1 -yes
+// 0 -no
+//for GPIO
+//2-gpio1
+//3-gpio2
+//4-gpio3
+//5-gpio4
+//6-gpio5
+//7-gpio6
+//8-gpio7
+
+
+//[Inverse CD Line Detection]
+//1 - yes
+//0 - no
+
+//[Detect card over CTS signal]
+//1 - yes
+//0 - no
+
+//[DM800/8000 box]
+//1 - yes
+//0 - no
+
+
+//[dbox serial/multicam]
+//1 - yes
+//0 - no
+
+/************************************************************************************************************************/
+
+
+#J: { 1 }
+// J option -> enable adding betacrypt header to N3 ECM for Premier
+// J { x }
+// x = 0 -> disabled
+// x = 1 -> enabled
+
+/************************************************************************************************************************/
+
+#S: { COM1 115200 }
+//S option -> enable sssp protocol
+//S: { x baud }
+//x=COM1
+//x=COM2
+//x=/dev/ttyS0
+//x=/dev/ttyS1
+//x= serial device ...
+//valids baud -> 115200,57600,38400,19200,9600
+/************************************************************************************************************************/
Index: k/source/emus_mbox0.6_0010/var/keys/mbox.cfg.mbox
===================================================================
--- /ipk/source/emus_mbox0.6_0010/var/keys/mbox.cfg.mbox	(revision 6662)
+++ 	(revision )
@@ -1,267 +1,0 @@
-
-
-//mbox.cfg EXPLANATION and EXAMPLES
-
-
-A: { 0 } // for QBoxHD receivers or for any receivers if needed it
-//A: { x }
-//Choose adapter path
-//x=0 -> /dev/dvb/adapter0/
-//x=1 -> /dev/dvb/adapter1/
-//x=2 -> /dev/dvb/adapter2/
-//x=.. -> .......
-//default x=0
-
-
-/************************************************************************************************************************/
-
-D: { 4 }
-
-//D: { x }
-//x=0 -> disable
-//x=1 -> enable dbox2 cw writing
-//x=2 -> enable STAPI for IPBOX
-//x=3 -> enable STAPI for Kathrein
-//x=4 -> enable Linux DVB API for Kathrein
-//x=5 -> enable triple dragon
-//x=6 -> enable Qbox HD
-//x=7 -> enable STAPI for Kathrein ufs922 -> dont work CSA decoding :(
-//default disabled
-
-/************************************************************************************************************************/
-
-B: { 0 0 0 }
-
-//B: { 1 127.0.0.1 127.0.0.1 } // for local watching over DVB
-
-
-//B: { x IP_listen IP_send }
-//x=0 -> disable local UDP ports 8004-80xx ,this ports are used with DVB cards and gbox plugin (Windows and Linux)
-//x=1 -> enable
-//IP_listen -> on what IP to wait for PMT and ECMs
-//IP_send -> on what IP to send DCW
-//default disabled
-
-/************************************************************************************************************************/
-
-
-Z: { 12 01 } { 127.0.0.1 8000 }
-
-//  Z option -> control sending/writing current informations
-//  Z: { xy 0z } { IP port }
-//   x=0 -> don't print time stamp (in console screen and in debug file)
-//   x=1 -> print time stamp ( .... )
-//   y=0 -> no writing/sending informations to debug file/destination IP
-//   y=1 -> send informations to destination IP but not in debug file
-//   y=2 -> write informations to debug file but don't send to destination IP
-//   y=3 -> write/send informations to debug file/destination IP
-//   z=0 -> dont write debug text in console window
-//   z=1 -> write debug text in console windows
-//   IP port -> destination IP and UDP port where to send informations
-//  no default
-
-/************************************************************************************************************************/
-
-#C: { 127.0.0.1 7999 }
-
-// C option -> control receiving some command messages localy or from another IP
-// C: { IP port }
-// IP-> your local IP or you DNS
-// port -> on what port you will be waiting command messages
-// no default
-
-/************************************************************************************************************************/
-
-
-U: { 1 }
-
-// U options -> Update peer(s) IP if it changes while peer still resending ecm's/cw etc.. information
-// default only on hello message peer(s) IP are updated !!!
-// U: { x }
-// x=0 -> disabled
-// x=1 -> enabled
-// default disabled
-
-/************************************************************************************************************************/
-
-L: { 1 }
-
-// L option -> how mbox to menage virtual card(s) with level 0
-// ( only for peer(s) who have and can reshare virtual cards but don't want to use LEVEL 0 card(s) for them self)
-// L: { x }
-// x=0 -> don't load any virtual cards with LEVEL 0, you can't use them for your self
-// x=1 -> load all virtual cards with LEVEL 0 ,you will be using them for your self
-// default 1
-
-/************************************************************************************************************************/
-
-#G: { /hdd/ }
-
-//G option -> redirect writing ONLY debug.txt file to internal or external HDD in receivers or for any other reason.
-//Remove #, ONLY if you want to use this option !!!!!!!
-
-/************************************************************************************************************************/
-
-T: { /tmp/ }
-
-// T option -> where to store temp files ... (share.info,debug.txt ,etc.)
-// T: { folder_path_to_files, example: T: { /tmp/ } }
-
-/************************************************************************************************************************/
-
-K: { /var/keys/ }
-
-// K option -> where is cwshare.cfg,mbox.prio file
-// K: { folder_path_to_files, example: K: { /var/keys/ } }
-
-
-/************************************************************************************************************************/
-
-
-M: { 1 }
-
-// M option -> Mode option
-// M: { x }
-// x=0 -> local mode no NET
-// x=1 -> NET mode
-// default 0
-
-/************************************************************************************************************************/
-
-
-P: { 2/tmp/camd.socket }
-
-
-// P option -> PMT location (Dont used with linux and windows)
-// you must be tuned to channel so image can generate this file
-// { /tmp/pmt.tmp } for receivers and images that create this file <- use this if you can
-// { /tmp/pmtX.tmp } X-> number -> pmt1.tmp ......
-// { 1/tmp/camd.socket } for enigma 1
-// { 2/tmp/camd.socket } for enigma 2
-
-/************************************************************************************************************************/
-
-W: { 0 }
-
-// W option -> write raw ECM to ecm.raw file
-// W: { x }
-// x=0 -> disabled
-// x=1 -> enabled
-// default disabled
-
-/************************************************************************************************************************/
-
-Q: { 300 }
-
-//Q option -> newcamd connect retry in sec.
-//Q: { x }
-// default 300 sec.
-
-/************************************************************************************************************************/
-
-F: { 500 }
-
-//F option -> reset writing debug.txt from begining if file size is higher then (x)(KB)
-//F { x } -> decimal in KBytes
-//default 500 KB
-
-
-/************************************************************************************************************************/
-
-//V: { card_type | device number | clock | inverse_Reset | inverse_CD_Line | detect card over CTS | DM800/8000 | dbox }
-#V: { 3 1 3571200 0 0 0 0 0 } // external reader example -> Seca card, com1 port, clock 3.57 Mhz,
-#V: { 3 2 3571200 1 0 0 0 0 }
-#V: { 3 3 1 0 0 0 0 0 } // dreambox example -> Seca card,sci0 slot,3.33 Mhz
-
-
-// [card_type]:
-// Seca 3
-// Irdeto 4
-// Conax 5
-// Cryptoworks 6
-// Viaccess 7
-// NDS 8
-// Nagravision 9
-
-
-
-// [device number]:
-// COM1/ttyS0 1
-// COM2/ttyS1 2
-// /dev/sci0  3
-// /dev/sci1  4
-// /dev/usb/tts/0  5
-// /dev/usb/tts/1  6
-// /dev/tts/0  7
-// /dev/tts/1  8
-// /dev/ttyUSB0 9
-// /dev/ttyUSB1 10
-// /dev/scard0 11 //azbox
-// /dev/scard1 12 //azbox
-
-
-
-//[clocks]
-//for COM ports and external card readers in Hz!!!
-
-//for SCI DreamBox slots use this values
-// 1 - 3.33 Mhz
-// 2 - 3.63 Mhz
-// 3 - 4 Mhz
-// 4 - 4.44 Mhz
-// 5 - 5Mhz
-// 6 - 5.71 Mhz
-// 7 - 6.66 Mhz
-// 8 - 8 Mhz
-
-//[Inverse Reset]
-// 1 -yes
-// 0 -no
-//for GPIO
-//2-gpio1
-//3-gpio2
-//4-gpio3
-//5-gpio4
-//6-gpio5
-//7-gpio6
-//8-gpio7
-
-
-//[Inverse CD Line Detection]
-//1 - yes
-//0 - no
-
-//[Detect card over CTS signal]
-//1 - yes
-//0 - no
-
-//[DM800/8000 box]
-//1 - yes
-//0 - no
-
-
-//[dbox serial/multicam]
-//1 - yes
-//0 - no
-
-/************************************************************************************************************************/
-
-
-#J: { 1 }
-// J option -> enable adding betacrypt header to N3 ECM for Premier
-// J { x }
-// x = 0 -> disabled
-// x = 1 -> enabled
-
-/************************************************************************************************************************/
-
-#S: { COM1 115200 }
-//S option -> enable sssp protocol
-//S: { x baud }
-//x=COM1
-//x=COM2
-//x=/dev/ttyS0
-//x=/dev/ttyS1
-//x= serial device ...
-//valids baud -> 115200,57600,38400,19200,9600
-/************************************************************************************************************************/
Index: /ipk/source/emus_mgcamd_1_35/CONTROL/postinst
===================================================================
--- /ipk/source/emus_mgcamd_1_35/CONTROL/postinst	(revision 6662)
+++ /ipk/source/emus_mgcamd_1_35/CONTROL/postinst	(revision 6663)
@@ -1,40 +1,7 @@
 #!/bin/sh
-TMP=/tmp/.mgcamd
-PLUGINDIR=/var/emu
+TMP=/tmp/.keys
+PLUGINDIR=/var/keys
+PLUGINDIR=/var/bin
 CONFIGDIR=/var/etc
-
-if [ ! -e /var/keys/mg_cfg ]; then
-	echo "renaming mg_cfg.mgcamd -> mg_cfg"
-	mv /var/keys/mg_cfg.mgcamd /var/keys/mg_cfg
-fi
-if [ ! -e /var/keys/peer.cfg ]; then
-	echo "renaming peer.cfg.mgcamd -> peer.cfg"
-	mv /var/keys/peer.cfg.mgcamd /var/keys/peer.cfg
-fi
-if [ ! -e /var/keys/ignore.list ]; then
-	echo "renaming ignore.list.mgcamd -> ignore.list"
-	mv /var/keys/ignore.list.mgcamd /var/keys/ignore.list
-fi
-if [ ! -e /var/keys/newcamd.list ]; then
-	echo "renaming newcamd.list.mgcamd -> newcamd.list"
-	mv /var/keys/newcamd.list.mgcamd /var/keys/newcamd.list
-fi
-if [ ! -e /var/keys/cccamd.list ]; then
-	echo "renaming cccamd.list.mgcamd -> cccamd.list"
-	mv /var/keys/cccamd.list.mgcamd /var/keys/cccamd.list
-fi
-if [ ! -e /var/keys/priority.list ]; then
-	echo "renaming priority.list.mgcamd -> priority.list"
-	mv /var/keys/priority.list.mgcamd /var/keys/priority.list
-fi
-if [ ! -e /var/keys/replace.list ]; then
-	echo "renaming replace.list.mgcamd -> replace.list"
-	mv /var/keys/replace.list.mgcamd /var/keys/replace.list
-fi
-if [ ! -e /var/keys/SoftCam.Key ]; then
-	echo "renaming SoftCam.Key.mgcamd -> SoftCam.Key"
-	mv /var/keys/SoftCam.Key.mgcamd /var/keys/SoftCam.Key
-fi
-
 echo "successfully installed"
 echo "syncing disk"
@@ -45,3 +12,67 @@
 	echo new freespace size $FREE kb
 fi
+
+if [ ! -e /var/keys/cccamd.list ]; then
+	echo "use ipk config file: cccamd.list"
+	echo "rename /var/keys/cccamd.list.mgcamd > /var/keys/cccamd.list"
+	mv /var/keys/cccamd.list.mgcamd /var/keys/cccamd.list
+else
+	echo "found user config file: cccamd.list"
+	echo "skip ipk config file: cccamd.list.mgcamd"
+fi
+
+if [ ! -e /var/keys/ignore.list ]; then
+	echo "use ipk config file: ignore.list"
+	echo "rename /var/keys/ignore.list.mgcamd > /var/keys/ignore.list"
+	mv /var/keys/ignore.list.mgcamd /var/keys/ignore.list
+else
+	echo "found user config file: ignore.list"
+	echo "skip ipk config file: ignore.list.mgcamd"
+fi
+
+if [ ! -e /var/keys/mg_cfg ]; then
+	echo "use ipk config file: mg_cfg"
+	echo "rename /var/keys/mg_cfg.mgcamd > /var/keys/mg_cfg"
+	mv /var/keys/mg_cfg.mgcamd /var/keys/mg_cfg
+else
+	echo "found user config file: mg_cfg"
+	echo "skip ipk config file: mg_cfg.mgcamd"
+fi
+
+if [ ! -e /var/keys/newcamd.list ]; then
+	echo "use ipk config file: newcamd.list"
+	echo "rename /var/keys/newcamd.list.mgcamd > /var/keys/newcamd.list"
+	mv /var/keys/newcamd.list.mgcamd /var/keys/newcamd.list
+else
+	echo "found user config file: newcamd.list"
+	echo "skip ipk config file: newcamd.list.mgcamd"
+fi
+
+if [ ! -e /var/keys/peer.cfg ]; then
+	echo "use ipk config file: peer.cfg"
+	echo "rename /var/keys/peer.cfg.mgcamd > /var/keys/peer.cfg"
+	mv /var/keys/peer.cfg.mgcamd /var/keys/peer.cfg
+else
+	echo "found user config file: peer.cfg"
+	echo "skip ipk config file: peer.cfg.mgcamd"
+fi
+
+if [ ! -e /var/keys/priority.list ]; then
+	echo "use ipk config file: priority.list"
+	echo "rename /var/keys/priority.list.mgcamd > /var/keys/priority.list"
+	mv /var/keys/priority.list.mgcamd /var/keys/priority.list
+else
+	echo "found user config file: priority.list"
+	echo "skip ipk config file: priority.list.mgcamd"
+fi
+
+if [ ! -e /var/keys/replace.list ]; then
+	echo "use ipk config file: replace.list"
+	echo "rename /var/keys/replace.list.mgcamd > /var/keys/replace.list"
+	mv /var/keys/replace.list.mgcamd /var/keys/replace.list
+else
+	echo "found user config file: replace.list"
+	echo "skip ipk config file: replace.list.mgcamd"
+fi
+
 exit 0
Index: /ipk/source/emus_mgcamd_1_35/CONTROL/postrm
===================================================================
--- /ipk/source/emus_mgcamd_1_35/CONTROL/postrm	(revision 6662)
+++ /ipk/source/emus_mgcamd_1_35/CONTROL/postrm	(revision 6663)
@@ -1,4 +1,4 @@
 #!/bin/sh
-TMP=/tmp/.mgcamd
+TMP=/tmp/.keys
 echo "successfully removed"
 echo "syncing disk"
@@ -9,3 +9,6 @@
 	echo new freespace size $FREE kb
 fi
+
+sync
+
 exit 0
Index: /ipk/source/emus_mgcamd_1_35/CONTROL/preinst
===================================================================
--- /ipk/source/emus_mgcamd_1_35/CONTROL/preinst	(revision 6662)
+++ /ipk/source/emus_mgcamd_1_35/CONTROL/preinst	(revision 6663)
@@ -1,5 +1,5 @@
 #!/bin/sh
 #
-TMP=/tmp/.mgcamd
+TMP=/tmp/.keys
 echo "syncing disk"
 sync
@@ -21,5 +21,5 @@
 	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
 	FREE=`expr $SPACE - 100`
-	SIZE=550
+	SIZE=122
 	echo "checking freespace"
 	echo packege size $SIZE kb
@@ -32,7 +32,7 @@
 	fi
 fi   
-echo "installing mgcamd ..."
+echo "installing mgcamd and configs..."
 echo "checking OS"
-if  [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then                      
+if  [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then
 	echo ---------------------------
 	echo DONT USE this IPK Package!!
@@ -43,3 +43,4 @@
 fi
 
+sync
 exit 0
Index: /ipk/source/emus_mgcamd_1_35/CONTROL/prerm
===================================================================
--- /ipk/source/emus_mgcamd_1_35/CONTROL/prerm	(revision 6662)
+++ /ipk/source/emus_mgcamd_1_35/CONTROL/prerm	(revision 6663)
@@ -1,5 +1,4 @@
 #!/bin/sh
-#
-TMP=/tmp/.mgcamd
+TMP=/tmp/.keys
 echo "syncing disk"
 sync
@@ -9,29 +8,41 @@
 	echo freespace size $FREE kb
 fi
-echo "removing mgcamd"
-if [ ! -e /var/keys/mg_cfg.mgcamd ]; then
-	echo "renaming mg_cfg -> mg_cfg.mgcamd"
-	mv /var/keys/mg_cfg /var/keys/mg_cfg.mgcamd
-fi
-if [ ! -e /var/keys/ignore.list.mgcamd ]; then
-	echo "renaming ignore.list -> ignore.list.mgcamd"
-	mv /var/keys/ignore.list /var/keys/ignore.list.mgcamd
-fi
-if [ ! -e /var/keys/newcamd.list.mgcamd ]; then
-	echo "renaming newcamd.list -> newcamd.list.mgcamd"
-	mv /var/keys/newcamd.list /var/keys/newcamd.list.mgcamd
-fi
-if [ ! -e /var/keys/priority.list.mgcamd ]; then
-	echo "renaming priority.list -> priority.list.mgcamd"
-	mv /var/keys/priority.list /var/keys/priority.list.mgcamd
-fi
-if [ ! -e /var/keys/replace.list.mgcamd ]; then
-	echo "renaming replace.list -> replace.list.mgcamd"
-	mv /var/keys/replace.list /var/keys/replace.list.mgcamd
-fi
-if [ ! -e /var/keys/SoftCam.Key.mgcamd ]; then
-	echo "renaming SoftCam.Key -> SoftCam.Key.mgcamd"
-	mv /var/keys/SoftCam.Key /var/keys/SoftCam.Key.mgcamd
+
+if [ ! -e /var/keys/cccamd.list.mgcamd ]; then
+	echo "remove ipk cccamd.list"
+	rm /var/keys/cccamd.list
 fi
 
+if [ ! -e /var/keys/ignore.list.mgcamd ]; then
+	echo "remove ipk ignore.list"
+	rm /var/keys/ignore.list
+fi
+
+if [ ! -e /var/keys/mg_cfg.mgcamd ]; then
+	echo "remove ipk mg_cfg"
+	rm /var/keys/mg_cfg
+fi
+
+if [ ! -e /var/keys/newcamd.list.mgcamd ]; then
+	echo "remove ipk newcamd.list"
+	rm /var/keys/newcamd.list
+fi
+
+if [ ! -e /var/keys/peer.cfg.mgcamd ]; then
+	echo "remove ipk peer.cfg"
+	rm /var/keys/peer.cfg
+fi
+
+if [ ! -e /var/keys/priority.list.mgcamd ]; then
+	echo "remove ipk priority.list"
+	rm /var/keys/priority.list
+fi
+
+if [ ! -e /var/keys/replace.list.mgcamd ]; then
+	echo "remove ipk replace.list"
+	rm /var/keys/replace.list
+fi
+
+echo "removing mgcamd and configs"
+
 exit 0
Index: /ipk/source/emus_mgcamd_1_35/var/keys/cccamd.list
===================================================================
--- /ipk/source/emus_mgcamd_1_35/var/keys/cccamd.list	(revision 6663)
+++ /ipk/source/emus_mgcamd_1_35/var/keys/cccamd.list	(revision 6663)
@@ -0,0 +1,1 @@
+C: 172.16.1.1 12000 user1 pass1
Index: k/source/emus_mgcamd_1_35/var/keys/cccamd.list.mgcamd
===================================================================
--- /ipk/source/emus_mgcamd_1_35/var/keys/cccamd.list.mgcamd	(revision 6662)
+++ 	(revision )
@@ -1,1 +1,0 @@
-C: 172.16.1.1 12000 user1 pass1
Index: /ipk/source/emus_mgcamd_1_35/var/keys/ignore.list
===================================================================
--- /ipk/source/emus_mgcamd_1_35/var/keys/ignore.list	(revision 6663)
+++ /ipk/source/emus_mgcamd_1_35/var/keys/ignore.list	(revision 6663)
@@ -0,0 +1,45 @@
+########  ORF Austria - FIX  test  ##########
+#
+#ignore viaccess providers:
+V: { 02 26 10 }
+V: { 03 29 40 }
+V: { 02 44 00 }
+#
+#ignore seca providers:
+S: { 00 81 }
+S: { 33 11 }
+S: { 33 17 }
+S: { A8 21 }
+S: { 00 6A }
+S: { 00 6C }
+S: { 00 6D }
+#
+#ignore CAID?s
+X: { 06 22 }
+X: { 06 24 }
+X: { 06 48 }
+X: { 09 AF }
+X: { 09 C4 }
+X: { 09 C7 }
+X: { 09 8E }
+X: { 0B 00 }
+# X: { 17 02 }
+X: { 17 22 }
+X: { 18 10 }
+X: { 18 15 }
+# X: { 18 33 }
+X: { 18 34 }
+X: { 18 37 }
+X: { 0D 00 }
+X: { 0D 02 }
+X: { 0D 03 }
+X: { 0D 70 }
+X: { 0D 95 }
+X: { 0D 96 }
+#
+#ignore irdeto chids
+I: { 00 02 }
+I: { 00 09 }
+I: { 00 14 }
+I: { 00 32 }
+I: { 00 33 }
Index: k/source/emus_mgcamd_1_35/var/keys/ignore.list.mgcamd
===================================================================
--- /ipk/source/emus_mgcamd_1_35/var/keys/ignore.list.mgcamd	(revision 6662)
+++ 	(revision )
@@ -1,45 +1,0 @@
-########  ORF Austria - FIX  test  ##########
-#
-#ignore viaccess providers:
-V: { 02 26 10 }
-V: { 03 29 40 }
-V: { 02 44 00 }
-#
-#ignore seca providers:
-S: { 00 81 }
-S: { 33 11 }
-S: { 33 17 }
-S: { A8 21 }
-S: { 00 6A }
-S: { 00 6C }
-S: { 00 6D }
-#
-#ignore CAID?s
-X: { 06 22 }
-X: { 06 24 }
-X: { 06 48 }
-X: { 09 AF }
-X: { 09 C4 }
-X: { 09 C7 }
-X: { 09 8E }
-X: { 0B 00 }
-# X: { 17 02 }
-X: { 17 22 }
-X: { 18 10 }
-X: { 18 15 }
-# X: { 18 33 }
-X: { 18 34 }
-X: { 18 37 }
-X: { 0D 00 }
-X: { 0D 02 }
-X: { 0D 03 }
-X: { 0D 70 }
-X: { 0D 95 }
-X: { 0D 96 }
-#
-#ignore irdeto chids
-I: { 00 02 }
-I: { 00 09 }
-I: { 00 14 }
-I: { 00 32 }
-I: { 00 33 }
Index: /ipk/source/emus_mgcamd_1_35/var/keys/mg_cfg
===================================================================
--- /ipk/source/emus_mgcamd_1_35/var/keys/mg_cfg	(revision 6663)
+++ /ipk/source/emus_mgcamd_1_35/var/keys/mg_cfg	(revision 6663)
@@ -0,0 +1,135 @@
+# EMM messages
+#    00 don't show any EMMs (default)
+#    01 show only valid EMMs
+#    02 show valid and bad EMMs with complete data display
+M: { 00 }
+
+# ECM messages
+#    00 don't show anything about ecm
+#    01 normal mode, show pids processed, decoded ecm and cw
+#    02 verbose mode, show valid and bad ECMs with data
+C: { 01 }
+
+# AU
+#    00 disable, no emm pids processed
+#    01 enable, emm pids always processed for soft-au and shared cards
+#    02 auto, emm started only if channel cant be decoded
+#    03 process emm pids for network cards update only
+A: { 01 }
+
+# key update (sum 01 or 02 with 04)
+#    01 update only new keys, default setting
+#    02 update all keys (used for valid PMK checking)
+#    04 enable TPS au
+#    + tps SID, which pmt pid contains au pid
+U: { 01 } 0x12c0
+
+# config files folder (softcam, autoroll, ignore/priority)
+#    00 files in /var/keys
+#    01 files in /tmp
+T: { 00 }
+
+# network mode, use summ for several clients
+#    00 no network (default)
+#    01 newcamd netclient
+#    02 radegast netclient
+#    04 camd3 netclient
+#    08 gbox netclient
+#    32	cccamd netclient, card list saved as /tmp/cccamd.info 
+#    	(ECM only, supported server version up to 2.1.1, later not work)
+G: { 32 }
+
+# network retry, use summ for several options
+#    00 disable
+#    01 retry every new ecm
+#    02 try to connect to offline shares every Q: seconds
+#    04 try to detect and fast reconnect to lost (and not used atm) server
+#    + XX messages number and YY seconds to reconnect
+#    mg will reconnect to server, if no answer to last XX ecm/keepalive or
+#    if no answer for last ecm or keepalive sent for YY seconds
+#    set to 0 to disable
+N: { 07 } 5 30
+
+# network ecm timeout in seconds
+K: { 05 }
+
+# newcamd dead routes connect retry, sec
+Q: { 600 }
+
+# network shares priority
+# 00 gbox, newcamd, cccamd, radegast, camd3 (default)
+# 01 camd3, radegast, cccamd, gbox, newcamd
+# 02 cccamd, newcamd, camd3, gbox, radegast
+P: { 02 }
+
+# on screen display type
+#    00 No OSD (default)
+#    01 neutrino
+#    02 enigma
+#    03 relook
+#    + user password for http auth
+O: { 01 } root newcs
+
+# on screen display Options, summ of:
+#    01 show emu ecm 
+#    02 show network shares messages
+#    04 show decoding failed / fta
+#    08 show emm keys update
+#    + web port to use for osd
+S: { 03 } 8080
+
+# Log option, summ of:
+#    00 off
+#    01 network udp log
+#    02 log to console
+#    04 file, appended ! delete it by yourself, before it eat all your hdd
+#    + IP udp-port log-file-name
+L: { 02 } 127.0.0.1 28007 /tmp/mgcamd.log
+
+# keep ecm cache, seconds
+# every cache entry takes 28 bytes, so 24h cache will take *only* 240-400kb of memory,
+# for openbox/elanvision users with remote shares make sense to set it higher than default value, 
+# to not hammer cards while timeshifting or playing crypted recordings.
+E: { 15 }
+
+# cache option, summ of:
+#    00 Off (default)
+#    01 Ecm pids cache, store pids used to decode in /tmp/ca_cache.list at exit, load at startup, same syntax as restore.list
+#    02 Ecm data cache, remember CW for (E:) time 
+#    04 Emm cache for network cards, do not resend the same emm twice, cache not cleared until restart
+H: { 07 }
+
+# reread files, summ of: 
+#    00 No (default)
+#    01 reread config file on channel change (including priority and ignore, but not replace/cache)
+#    02 reread SoftCam.Key on channel change
+#    04 reread SoftCam.Key if file changed
+R: { 00 }
+
+# debug, summ of
+# 00 off (default)
+# 01 debug ecm
+# 02 debug emm
+# 04 debug network ecm
+# 08 debug network emm
+# 16 debug network login
+# 32 show mem/cpu stats every 1 min
+# 64 add timestamp to log messages
+D: { 00 }
+
+# box type
+# 00 autodetect, change only if you think wrong type detected.
+# 01 dbox2
+# 02 dreambox
+# 03 triple-dragon
+# 04 relook
+# 05 openbox
+# 06 dreambox/mips
+# 08 stapi/kathrein
+# 09 stapi/ipbox
+# 11 stapi/openbox
+B: { 11 }
+
+# map all 180x nagra caids to 1801
+# default is 01
+F: { 00 }
Index: k/source/emus_mgcamd_1_35/var/keys/mg_cfg.mgcamd
===================================================================
--- /ipk/source/emus_mgcamd_1_35/var/keys/mg_cfg.mgcamd	(revision 6662)
+++ 	(revision )
@@ -1,135 +1,0 @@
-# EMM messages
-#    00 don't show any EMMs (default)
-#    01 show only valid EMMs
-#    02 show valid and bad EMMs with complete data display
-M: { 00 }
-
-# ECM messages
-#    00 don't show anything about ecm
-#    01 normal mode, show pids processed, decoded ecm and cw
-#    02 verbose mode, show valid and bad ECMs with data
-C: { 01 }
-
-# AU
-#    00 disable, no emm pids processed
-#    01 enable, emm pids always processed for soft-au and shared cards
-#    02 auto, emm started only if channel cant be decoded
-#    03 process emm pids for network cards update only
-A: { 01 }
-
-# key update (sum 01 or 02 with 04)
-#    01 update only new keys, default setting
-#    02 update all keys (used for valid PMK checking)
-#    04 enable TPS au
-#    + tps SID, which pmt pid contains au pid
-U: { 01 } 0x12c0
-
-# config files folder (softcam, autoroll, ignore/priority)
-#    00 files in /var/keys
-#    01 files in /tmp
-T: { 00 }
-
-# network mode, use summ for several clients
-#    00 no network (default)
-#    01 newcamd netclient
-#    02 radegast netclient
-#    04 camd3 netclient
-#    08 gbox netclient
-#    32	cccamd netclient, card list saved as /tmp/cccamd.info 
-#    	(ECM only, supported server version up to 2.1.1, later not work)
-G: { 32 }
-
-# network retry, use summ for several options
-#    00 disable
-#    01 retry every new ecm
-#    02 try to connect to offline shares every Q: seconds
-#    04 try to detect and fast reconnect to lost (and not used atm) server
-#    + XX messages number and YY seconds to reconnect
-#    mg will reconnect to server, if no answer to last XX ecm/keepalive or
-#    if no answer for last ecm or keepalive sent for YY seconds
-#    set to 0 to disable
-N: { 07 } 5 30
-
-# network ecm timeout in seconds
-K: { 05 }
-
-# newcamd dead routes connect retry, sec
-Q: { 600 }
-
-# network shares priority
-# 00 gbox, newcamd, cccamd, radegast, camd3 (default)
-# 01 camd3, radegast, cccamd, gbox, newcamd
-# 02 cccamd, newcamd, camd3, gbox, radegast
-P: { 02 }
-
-# on screen display type
-#    00 No OSD (default)
-#    01 neutrino
-#    02 enigma
-#    03 relook
-#    + user password for http auth
-O: { 01 } root newcs
-
-# on screen display Options, summ of:
-#    01 show emu ecm 
-#    02 show network shares messages
-#    04 show decoding failed / fta
-#    08 show emm keys update
-#    + web port to use for osd
-S: { 03 } 8080
-
-# Log option, summ of:
-#    00 off
-#    01 network udp log
-#    02 log to console
-#    04 file, appended ! delete it by yourself, before it eat all your hdd
-#    + IP udp-port log-file-name
-L: { 02 } 127.0.0.1 28007 /tmp/mgcamd.log
-
-# keep ecm cache, seconds
-# every cache entry takes 28 bytes, so 24h cache will take *only* 240-400kb of memory,
-# for openbox/elanvision users with remote shares make sense to set it higher than default value, 
-# to not hammer cards while timeshifting or playing crypted recordings.
-E: { 15 }
-
-# cache option, summ of:
-#    00 Off (default)
-#    01 Ecm pids cache, store pids used to decode in /tmp/ca_cache.list at exit, load at startup, same syntax as restore.list
-#    02 Ecm data cache, remember CW for (E:) time 
-#    04 Emm cache for network cards, do not resend the same emm twice, cache not cleared until restart
-H: { 07 }
-
-# reread files, summ of: 
-#    00 No (default)
-#    01 reread config file on channel change (including priority and ignore, but not replace/cache)
-#    02 reread SoftCam.Key on channel change
-#    04 reread SoftCam.Key if file changed
-R: { 00 }
-
-# debug, summ of
-# 00 off (default)
-# 01 debug ecm
-# 02 debug emm
-# 04 debug network ecm
-# 08 debug network emm
-# 16 debug network login
-# 32 show mem/cpu stats every 1 min
-# 64 add timestamp to log messages
-D: { 00 }
-
-# box type
-# 00 autodetect, change only if you think wrong type detected.
-# 01 dbox2
-# 02 dreambox
-# 03 triple-dragon
-# 04 relook
-# 05 openbox
-# 06 dreambox/mips
-# 08 stapi/kathrein
-# 09 stapi/ipbox
-# 11 stapi/openbox
-B: { 11 }
-
-# map all 180x nagra caids to 1801
-# default is 01
-F: { 00 }
Index: /ipk/source/emus_mgcamd_1_35/var/keys/newcamd.list
===================================================================
--- /ipk/source/emus_mgcamd_1_35/var/keys/newcamd.list	(revision 6663)
+++ /ipk/source/emus_mgcamd_1_35/var/keys/newcamd.list	(revision 6663)
@@ -0,0 +1,4 @@
+CWS_KEEPALIVE = 300
+CWS_INCOMING_PORT = 21000
+CWS = 192.168.1.1 20000 dummy dummy 10 02 13 04 15 06 17 08 01 10 11 12 13 14 lan server1
+CWS_MULTIPLE = 192.168.1.2 20000:20005 dummy dummy 10 02 13 04 15 06 17 08 01 10 11 12 13 14 lan server2
Index: k/source/emus_mgcamd_1_35/var/keys/newcamd.list.mgcamd
===================================================================
--- /ipk/source/emus_mgcamd_1_35/var/keys/newcamd.list.mgcamd	(revision 6662)
+++ 	(revision )
@@ -1,4 +1,0 @@
-CWS_KEEPALIVE = 300
-CWS_INCOMING_PORT = 21000
-CWS = 192.168.1.1 20000 dummy dummy 10 02 13 04 15 06 17 08 01 10 11 12 13 14 lan server1
-CWS_MULTIPLE = 192.168.1.2 20000:20005 dummy dummy 10 02 13 04 15 06 17 08 01 10 11 12 13 14 lan server2
Index: /ipk/source/emus_mgcamd_1_35/var/keys/peer.cfg
===================================================================
--- /ipk/source/emus_mgcamd_1_35/var/keys/peer.cfg	(revision 6663)
+++ /ipk/source/emus_mgcamd_1_35/var/keys/peer.cfg	(revision 6663)
@@ -0,0 +1,38 @@
+# sample peer.cfg for gbox client in mgcamd
+# syntax the same as in cwshare.cfg, 
+# you can just copy cwshare.cfg to this file.
+# see below for supported tags, others not supported (yet).
+
+# max cards to send ecm too + preffered cards ids (up to 32)
+X: { 05 } 1234 ABCD
+
+# max card's distance to use for ecm
+I: ( 05 }
+
+# resend after 2 seconds, re-sync (send to all) after 3 seconds
+N: { 0 0 0 0 2000 3000 }
+# same, but for NDS cards
+S: { 0 0 0 0 400 500 }
+
+# my host and password
+M: { my.dyndns.com { 1234ABCD }}
+
+# peers, unlimited number, but only up to 32 unique ports to listen
+# host, port to listen, remote port, password, levels (ignored)
+D: { peer1.dyndns.com { 2471 3471 { ABCD1234 { 9 9 }}}}
+D: { peer2.dyndns.com { 2471 3471 { 6789ABCD { 9 9 }}}}
+
+# ignore ids
+Y: { 01 02 }
+Y: { 02 03 }
+
+# always save ids, caid-id + id
+G: { 05023B00 1234 }
+G: { 01000065 5678 }
+
+# virtual cards
+V: { 01 { 05 00 7C 00 }}
+V: { 02 { 18 01 04 01 }}
+V: { 02 { 18 01 05 01 }}
+V: { 03 { 18 01 40 01 }}
+V: { 03 { 18 01 41 01 }}
Index: k/source/emus_mgcamd_1_35/var/keys/peer.cfg.mgcamd
===================================================================
--- /ipk/source/emus_mgcamd_1_35/var/keys/peer.cfg.mgcamd	(revision 6662)
+++ 	(revision )
@@ -1,38 +1,0 @@
-# sample peer.cfg for gbox client in mgcamd
-# syntax the same as in cwshare.cfg, 
-# you can just copy cwshare.cfg to this file.
-# see below for supported tags, others not supported (yet).
-
-# max cards to send ecm too + preffered cards ids (up to 32)
-X: { 05 } 1234 ABCD
-
-# max card's distance to use for ecm
-I: ( 05 }
-
-# resend after 2 seconds, re-sync (send to all) after 3 seconds
-N: { 0 0 0 0 2000 3000 }
-# same, but for NDS cards
-S: { 0 0 0 0 400 500 }
-
-# my host and password
-M: { my.dyndns.com { 1234ABCD }}
-
-# peers, unlimited number, but only up to 32 unique ports to listen
-# host, port to listen, remote port, password, levels (ignored)
-D: { peer1.dyndns.com { 2471 3471 { ABCD1234 { 9 9 }}}}
-D: { peer2.dyndns.com { 2471 3471 { 6789ABCD { 9 9 }}}}
-
-# ignore ids
-Y: { 01 02 }
-Y: { 02 03 }
-
-# always save ids, caid-id + id
-G: { 05023B00 1234 }
-G: { 01000065 5678 }
-
-# virtual cards
-V: { 01 { 05 00 7C 00 }}
-V: { 02 { 18 01 04 01 }}
-V: { 02 { 18 01 05 01 }}
-V: { 03 { 18 01 40 01 }}
-V: { 03 { 18 01 41 01 }}
Index: /ipk/source/emus_mgcamd_1_35/var/keys/priority.list
===================================================================
--- /ipk/source/emus_mgcamd_1_35/var/keys/priority.list	(revision 6663)
+++ /ipk/source/emus_mgcamd_1_35/var/keys/priority.list	(revision 6663)
@@ -0,0 +1,2 @@
+# for ORF Austria FIX
+X: { 0d 05 }
Index: k/source/emus_mgcamd_1_35/var/keys/priority.list.mgcamd
===================================================================
--- /ipk/source/emus_mgcamd_1_35/var/keys/priority.list.mgcamd	(revision 6662)
+++ 	(revision )
@@ -1,2 +1,0 @@
-# for ORF Austria FIX
-X: { 0d 05 }
Index: /ipk/source/emus_mgcamd_1_35/var/keys/replace.list
===================================================================
--- /ipk/source/emus_mgcamd_1_35/var/keys/replace.list	(revision 6663)
+++ /ipk/source/emus_mgcamd_1_35/var/keys/replace.list	(revision 6663)
@@ -0,0 +1,7 @@
+# replace old with new {{ sid } { caid } { provid } { ecmpid } { newcaid } { newprovid } { newecmpid }}
+# multivision 1 example
+# R: {{ 515 } { 500 } { 7C00 } { A0 } { 500 } { 7800 } { A1 }}
+# OR put this ecm on top if new* = 0
+# R: {{ 515 } { 500 } { 7800 } { A1 } { 0 } { 0 } { 0 }}
+# replace old caid > newcaid example
+# X: {{ 624 } { 604 }}
Index: k/source/emus_mgcamd_1_35/var/keys/replace.list.mgcamd
===================================================================
--- /ipk/source/emus_mgcamd_1_35/var/keys/replace.list.mgcamd	(revision 6662)
+++ 	(revision )
@@ -1,7 +1,0 @@
-# replace old with new {{ sid } { caid } { provid } { ecmpid } { newcaid } { newprovid } { newecmpid }}
-# multivision 1 example
-# R: {{ 515 } { 500 } { 7C00 } { A0 } { 500 } { 7800 } { A1 }}
-# OR put this ecm on top if new* = 0
-# R: {{ 515 } { 500 } { 7800 } { A1 } { 0 } { 0 } { 0 }}
-# replace old caid > newcaid example
-# X: {{ 624 } { 604 }}
Index: /ipk/source/emus_newcs/CONTROL/postinst
===================================================================
--- /ipk/source/emus_newcs/CONTROL/postinst	(revision 6662)
+++ /ipk/source/emus_newcs/CONTROL/postinst	(revision 6663)
@@ -12,3 +12,13 @@
 	echo new freespace size $FREE kb
 fi
+
+if [ ! -e /var/keys/newcs.xml ]; then
+	echo "use ipk config file: newcs.xml"
+	echo "rename /var/keys/newcs.xml.newcs > /var/keys/newcs.xml"
+	mv /var/keys/newcs.xml.newcs /var/keys/newcs.xml
+else
+	echo "found user config file: newcs.xml"
+	echo "skip ipk config file: newcs.xml.newcs"
+fi
+
 exit 0
Index: /ipk/source/emus_newcs/CONTROL/postrm
===================================================================
--- /ipk/source/emus_newcs/CONTROL/postrm	(revision 6662)
+++ /ipk/source/emus_newcs/CONTROL/postrm	(revision 6663)
@@ -10,11 +10,4 @@
 fi
 
-if [ -e /var/keys/newcs.xml.bak ]; then
-	echo "renaming your saved newcs.xml"
-	mv /var/keys/newcs.xml.bak /var/keys/newcs.xml
-fi
-
-
-
 sync
 
Index: /ipk/source/emus_newcs/CONTROL/preinst
===================================================================
--- /ipk/source/emus_newcs/CONTROL/preinst	(revision 6662)
+++ /ipk/source/emus_newcs/CONTROL/preinst	(revision 6663)
@@ -32,5 +32,5 @@
 	fi
 fi   
-echo "installing newcs config..."
+echo "installing Newcs and configs..."
 echo "checking OS"
 if  [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then
@@ -43,9 +43,5 @@
 fi
 
-if [ -e /var/keys/newcs.xml ]; then
-	echo "saving your actual newcs.xml"
-	mv /var/keys/newcs.xml /var/keys/newcs.xml.bak
-fi
-
 sync
 exit 0
+
Index: /ipk/source/emus_newcs/CONTROL/prerm
===================================================================
--- /ipk/source/emus_newcs/CONTROL/prerm	(revision 6662)
+++ /ipk/source/emus_newcs/CONTROL/prerm	(revision 6663)
@@ -8,4 +8,11 @@
 	echo freespace size $FREE kb
 fi
+
+if [ ! -e /var/keys/newcs.xml.newcs ]; then
+	echo "remove ipk newcs.xml"
+	rm /var/keys/newcs.xml
+fi
+
+
 echo "removing newcs and configs"
 exit 0
Index: /ipk/source/emus_oscam_4066/CONTROL/postinst
===================================================================
--- /ipk/source/emus_oscam_4066/CONTROL/postinst	(revision 6662)
+++ /ipk/source/emus_oscam_4066/CONTROL/postinst	(revision 6663)
@@ -12,3 +12,67 @@
 	echo new freespace size $FREE kb
 fi
+
+if [ ! -e /var/keys/oscam.conf ]; then
+	echo "use ipk config file: oscam.conf"
+	echo "rename /var/keys/oscam.conf.oscam > /var/keys/oscam.conf"
+	mv /var/keys/oscam.conf.oscam /var/keys/oscam.conf
+else
+	echo "found user config file: oscam.conf"
+	echo "skip ipk config file: oscam.conf.oscam"
+fi
+
+if [ ! -e /var/keys/oscam.provid ]; then
+	echo "use ipk config file: oscam.provid"
+	echo "rename /var/keys/oscam.provid.oscam > /var/keys/oscam.provid"
+	mv /var/keys/oscam.provid.oscam /var/keys/oscam.provid
+else
+	echo "found user config file: oscam.provid"
+	echo "skip ipk config file: oscam.provid.oscam"
+fi
+
+if [ ! -e /var/keys/oscam.srvid ]; then
+	echo "use ipk config file: oscam.srvid"
+	echo "rename /var/keys/oscam.srvid.oscam > /var/keys/oscam.srvid"
+	mv /var/keys/oscam.srvid.oscam /var/keys/oscam.srvid
+else
+	echo "found user config file: oscam.srvid"
+	echo "skip ipk config file: oscam.srvid.oscam"
+fi
+
+if [ ! -e /var/keys/oscam.server ]; then
+	echo "use ipk config file: oscam.server"
+	echo "rename /var/keys/oscam.server.oscam > /var/keys/oscam.server"
+	mv /var/keys/oscam.server.oscam /var/keys/oscam.server
+else
+	echo "found user config file: oscam.server"
+	echo "skip ipk config file: oscam.server.oscam"
+fi
+
+if [ ! -e /var/keys/oscam.user ]; then
+	echo "use ipk config file: oscam.user"
+	echo "rename /var/keys/oscam.user.oscam > /var/keys/oscam.user"
+	mv /var/keys/oscam.user.oscam /var/keys/oscam.user
+else
+	echo "found user config file: oscam.user"
+	echo "skip ipk config file: oscam.user.oscam"
+fi
+
+if [ ! -e /var/keys/oscam.services ]; then
+	echo "use ipk config file: oscam.services"
+	echo "rename /var/keys/oscam.services.oscam > /var/keys/oscam.services"
+	mv /var/keys/oscam.services.oscam /var/keys/oscam.services
+else
+	echo "found user config file: oscam.services"
+	echo "skip ipk config file: oscam.services.oscam"
+fi
+
+if [ ! -e /var/keys/oscam.dvbapi ]; then
+	echo "use ipk config file: oscam.dvbapi"
+	echo "rename /var/keys/oscam.dvbapi.oscam > /var/keys/oscam.dvbapi"
+	mv /var/keys/oscam.dvbapi.oscam /var/keys/oscam.dvbapi
+else
+	echo "found user config file: oscam.dvbapi"
+	echo "skip ipk config file: oscam.dvbapi.oscam"
+fi
+
 exit 0
Index: /ipk/source/emus_oscam_4066/CONTROL/postrm
===================================================================
--- /ipk/source/emus_oscam_4066/CONTROL/postrm	(revision 6662)
+++ /ipk/source/emus_oscam_4066/CONTROL/postrm	(revision 6663)
@@ -10,39 +10,4 @@
 fi
 
-if [ -e /var/keys/oscam.conf.bak ]; then
-	echo "renaming your saved oscam.conf"
-	mv /var/keys/oscam.conf.bak /var/keys/oscam.conf
-fi
-
-if [ -e /var/keys/oscam.provid.bak ]; then
-	echo "renaming your saved oscam.provid"
-	mv /var/keys/oscam.provid.bak /var/keys/oscam.provid
-fi
-
-if [ -e /var/keys/oscam.srvid.bak ]; then
-	echo "renaming your saved oscam.srvid"
-	mv /var/keys/oscam.srvid.bak /var/keys/oscam.srvid
-fi
-
-if [ -e /var/keys/oscam.server.bak ]; then
-	echo "renaming your saved oscam.server"
-	mv /var/keys/oscam.server.bak /var/keys/oscam.server
-fi
-
-if [ -e /var/keys/oscam.user.bak ]; then
-	echo "renaming your saved oscam.user"
-	mv /var/keys/oscam.user.bak /var/keys/oscam.user
-fi
-
-if [ -e /var/keys/oscam.services.bak ]; then
-	echo "renaming your saved oscam.services"
-	mv /var/keys/oscam.services.bak /var/keys/oscam.services
-fi
-
-if [ -e /var/keys/oscam.dvbapi.bak ]; then
-	echo "renaming your saved oscam.dvbapi"
-	mv /var/keys/oscam.dvbapi.bak /var/keys/oscam.dvbapi
-fi
-
 sync
 
Index: /ipk/source/emus_oscam_4066/CONTROL/preinst
===================================================================
--- /ipk/source/emus_oscam_4066/CONTROL/preinst	(revision 6662)
+++ /ipk/source/emus_oscam_4066/CONTROL/preinst	(revision 6663)
@@ -32,5 +32,5 @@
 	fi
 fi   
-echo "installing Oscm config..."
+echo "installing Oscam config..."
 echo "checking OS"
 if  [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then
@@ -43,39 +43,4 @@
 fi
 
-if [ -e /var/keys/oscam.conf ]; then
-	echo "saving your actual oscam.conf"
-	mv /var/keys/oscam.conf /var/keys/oscam.conf.bak
-fi
-
-if [ -e /var/keys/oscam.provid ]; then
-	echo "saving your actual oscam.provid"
-	mv /var/keys/oscam.provid /var/keys/oscam.provid.bak
-fi
-
-if [ -e /var/keys/oscam.srvid ]; then
-	echo "saving your actual oscam.srvid"
-	mv /var/keys/oscam.srvid /var/keys/oscam.srvid.bak
-fi
-
-if [ -e /var/keys/oscam.server ]; then
-	echo "saving your actual oscam.server"
-	mv /var/keys/oscam.server /var/keys/oscam.server.bak
-fi
-
-if [ -e /var/keys/oscam.user ]; then
-	echo "saving your actual oscam.user"
-	mv /var/keys/oscam.user /var/keys/oscam.user.bak
-fi
-
-if [ -e /var/keys/oscam.services ]; then
-	echo "saving your actual oscam.services"
-	mv /var/keys/oscam.services /var/keys/oscam.services.bak
-fi
-
-if [ -e /var/keys/oscam.dvbapi ]; then
-	echo "saving your actual oscam.dvbapi"
-	mv /var/keys/oscam.dvbapi /var/keys/oscam.dvbapi.bak
-fi
-
 sync
 exit 0
Index: /ipk/source/emus_oscam_4066/CONTROL/prerm
===================================================================
--- /ipk/source/emus_oscam_4066/CONTROL/prerm	(revision 6662)
+++ /ipk/source/emus_oscam_4066/CONTROL/prerm	(revision 6663)
@@ -8,4 +8,40 @@
 	echo freespace size $FREE kb
 fi
+
+if [ ! -e /var/keys/oscam.conf.oscam ]; then
+	echo "remove ipk oscam.conf"
+	rm /var/keys/oscam.conf
+fi
+
+if [ ! -e /var/keys/oscam.provid.oscam ]; then
+	echo "remove ipk oscam.provid"
+	rm /var/keys/oscam.provid
+fi
+
+if [ ! -e /var/keys/oscam.srvid.oscam ]; then
+	echo "remove ipk oscam.srvid"
+	rm /var/keys/oscam.srvid
+fi
+
+if [ ! -e /var/keys/oscam.server.oscam ]; then
+	echo "remove ipk oscam.server"
+	rm /var/keys/oscam.server
+fi
+
+if [ ! -e /var/keys/oscam.user.oscam ]; then
+	echo "remove ipk oscam.user"
+	rm /var/keys/oscam.user
+fi
+
+if [ ! -e /var/keys/oscam.services.oscam ]; then
+	echo "remove ipk oscam.services"
+	rm /var/keys/oscam.services
+fi
+
+if [ ! -e /var/keys/oscam.dvbapi.oscam ]; then
+	echo "remove ipk oscam.dvbapi"
+	rm /var/keys/oscam.dvbapi
+fi
+
 echo "removing oscam and configs"
 exit 0
