#!/bin/sh

if [ ! -f netserver_d/Netscript ]; then
	echo "BONE has not been installed!"
	exit 1
fi

if [ ! -f bone_d/set ]; then
	echo "The netserver has allready been set as the current network environment!"
	exit 1
fi

rm bone_d/set
cp /system/boot/Netscript bone_d
cp netserver_d/Netscript /system/boot/
cp netserver_d/libnet.so /system/lib/
cp netserver_d/libnetapi.so /system/lib/
cp netserver_d/bin/* /bin
touch netserver_d/set

echo "The netserver has been restored"
