#!/bin/sh
#set >> /tmp/dhcp.$$
case "$reason" in
REBOOT|BOUND|RENEW|REBIND)
#	echo "DOING[4] $reason $interface"
#	logger -t dhcpcd -p daemon.info "DOING $reason $interface"
	case $interface in
	sk0)
		/etc/rc.d/racoon onerestart
		/etc/rc.d/ipsec onerestart
		/etc/rc.d/xl2tpd onerestart
		/etc/rc.d/named restart
		/etc/rc.d/npf onerestart
		/etc/rc.d/npfd onerestart
		/usr/local/etc/quasar-update $new_ip_address
		/etc/rc.d/blacklistd onerestart
		;;
	bge0)
		/etc/rc.d/staticroute onerestart
		;;
	esac
	;;
REBOOT6|BOUND6|RENEW6|REBIND6)
#	echo "DOING[6] $reason $interface"
#	logger -t dhcpcd -p daemon.info "DOING[6] $reason $interface"
	case $interface in
	sk0)
		/usr/local/etc/quasar-update $new_dhcp6_ia_na1_ia_addr1
		;;
	bge0)
		/etc/rc.d/rtadvd restart
		/usr/local/etc/mkv6 $new_ip_address
		;;
	esac
	;;
*)
#	echo "NOT DOING $reason $interface"
#	logger -t dhcpcd -p daemon.info "NOT DOING $reason $interface"
	;;
esac
