# Update hostname when DHCP got a new IP address

if [ /etc/debian-edu/config ] ; then
    . /etc/debian-edu/config
fi

if [ false = "$DHCP_HOSTNAME_UPDATE" ] ; then
    exit 0
fi

case $reason in
    BOUND|RENEW|REBIND|REBOOT)
	/usr/sbin/update-hostname-from-ip
	;;
    EXPIRE|FAIL|RELEASE|STOP)
	;;
esac
