#!/bin/sh
# Workaround for 710490 where autofs cache failing DNS entries
# when started before the network is up.

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

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

case $reason in
    BOUND|RENEW|REBIND|REBOOT)
	logger -t autofs-reload "reloading autofs from dhcp exit hook"
	service autofs reload
	;;
    EXPIRE|FAIL|RELEASE|STOP)
	;;
esac
