#!/bin/sh

set -e 

if [ "$1" = install -o "$1" = upgrade ]; then
	if dpkg-divert --list /usr/sbin/dhcpd \
		| grep -q "by isc-dhcp-server-ldap";
	then
		exit 0
	fi
		
	dpkg-divert --package isc-dhcp-server-ldap --add --rename \
		--divert /usr/sbin/dhcpd-noldap /usr/sbin/dhcpd
fi

#DEBHELPER#
