#!/bin/sh                                                                       

#version 1155


uninstall_all()
{
		#clean old DuoKan script
		rm -f /etc/rcS.d/S79switch
		rm -f /etc/rc5.d/s96rundk
		rm -f /etc/rc5.d/S96rundk
		rm -f /etc/rc5.d/rundk.sh
		rm -f /etc/rc5.d/S95dkupdate
		sync
		
		#clean new DuoKan script
		rm -f /etc/init.d/DK_update
		rm -f /etc/init.d/DK_switch
		rm -f /etc/init.d/DK_run	
		rm -f /etc/rc5.d/S79DK_update
		rm -f /etc/rc5.d/S95DK_switch
		rm -f /etc/rc5.d/S96DK_run
		sync
		
		rm -rf /mnt/us/DK_System/
		rm -rf /test/DKLite 
		rm -rf /mnt/us/DK_Mbp/
		rm -rf /mnt/us/DK_User/
		rm	-f /mnt/base/?pdate*.bin
		sync
		
		#clean something we don't now
		rm -f /dev/viewinfodat1.txt
		rm -f /dev/viewinfodat.txt
		rm -f /dev/activeevent
		rm -f /dev/usbevent
		rm -f /dev/DK_Debug.log  
		rm -f /etc/rcS.d/S79showmenu
		rm -f /etc/init.d/usb_switch
		rm -f /etc/rc5.d/usbsingle.sh
		
		sync
}

echo "uninstall all"

mntroot rw

ln -s /etc/init.d/framework 	/etc/rc5.d/S95framework
uninstall_all

sync
mntroot ro

shutdown -r -F now
return
			

