#!/bin/sh
[ -z "$wan_port" ] && echo "Error: wan port should be indicated"
echo "current wan port is $wan_port"

if [ "$wan_port" -eq "0" ]
	then
/bin/cp /proc/uptime /tmp/wan_uptime
/bin/cp /etc/ppp/resolv.conf /tmp/resolv.conf
	else
	/bin/cp /proc/uptime /tmp/wan_uptime$wan_port 
fi

#/bin/cp /etc/ppp/resolv.conf /tmp/resolv.conf

/usr/sbin/rc service restart
#/usr/sbin/rc dhcpd create
/bin/cp /usr/etc/ppp/ip-down /etc/ppp/
#/usr/bin/killall -SIGUSR2 udhcpd
