#!/bin/sh
# Make sure LDAP certificate is downloaded when the network become
# available, if the init.d script failed to fetch it at boot.

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

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

case $reason in
    BOUND|RENEW|REBIND|REBOOT)
	/etc/init.d/fetch-ldap-cert start
	;;
    EXPIRE|FAIL|RELEASE|STOP)
	;;
esac
