#!/bin/sh -e
#
# Test if the DHCP server is working.

cfg=/etc/default/dhcp3-server

if [ -f $cfg ] ; then
    . $cfg
    echo "info: $0: configured interfaces is '$INTERFACES'"
else
    echo "error: $0: $cfg is missing."
    exit 1
fi

if pidof dhcpd3 > /dev/null ; then
    echo "success: $0: dhcpd3 is running."
else
    echo "error: $0: dhcpd3 is not running."
    exit 1
fi

exit 0
