#!/bin/sh

# set the default gateway
/sbin/route add default $5

# restart services that depends on the new ip
/etc/rc.d/ipfilter resync
/etc/rc.d/ipnat restart
/etc/rc.d/altqd restart
/usr/pkg/etc/rc.d/named9 restart

# update my hostname
/usr/local/sbin/ddup --host tecneeq.dyndns.org

# put the new ip to a file
/bin/echo "$4" > /tmp/last_dsl_ip 

# eof
