#!/bin/sh -e
#
#

if [ "$1" = "purge" ]; then
	# Remove lease database
	rm -f /var/lib/dhcp/dhclient.leases*

	# Try to remove directory
	if [ -d /var/lib/dhcp ]; then
		rmdir --ignore-fail-on-non-empty /var/lib/dhcp/
	fi

	rmdir --ignore-fail-on-non-empty /etc/dhcp

fi


