#!/bin/sh
#
#

set -e

# Source debconf library.
. /usr/share/debconf/confmodule

case "$1" in
    configure)
        if [ ! -e /var/lib/dhcp/dhclient.leases ]; then
            if test -e /var/lib/dhcp3/dhclient.leases; then
                cp /var/lib/dhcp3/dhclient.leases /var/lib/dhcp/dhclient.leases
            else
                touch /var/lib/dhcp/dhclient.leases
            fi
        fi

	if [ -z "$2" ]; then
		if [ -e /etc/dhcp3/dhclient.conf ]; then
			cp /etc/dhcp3/dhclient.conf /etc/dhcp/dhclient.conf
		fi
	fi

        ;;

    abort-upgrade|abort-remove|abort-deconfigure)
        exit 0
        ;;
    
    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 0
        ;;
esac


