#!/bin/sh

mntroot rw
rm -f /etc/rcS.d/S79switch 

cp /mnt/us/DK_System/install/S79switch /etc/rcS.d/S79switch
cp /mnt/us/DK_System/install/rundk.sh /etc/rc5.d/rundk.sh

chmod +x /etc/rcS.d/S79switch
chmod +x /etc/rc5.d/rundk.sh

if [ -f /etc/rc5.d/S96rundk ]
then
		rm -f /etc/rc5.d/S96rundk
   		rm -f /etc/rc5.d/s96rundk
		cp /mnt/us/DK_System/install/s96rundk /etc/rc5.d/S96rundk
		chmod +x /etc/rc5.d/S96rundk
else
		rm -f /etc/rc5.d/S96rundk
  		rm -f /etc/rc5.d/s96rundk
		cp /mnt/us/DK_System/install/s96rundk /etc/rc5.d/s96rundk
		chmod +x /etc/rc5.d/s96rundk
fi

sync
mntroot ro

