3 # $Id: dhcp3-server.init.d,v 1.4 2003/07/13 19:12:41 mdz Exp $
6 test -f /usr/sbin/dhcpd || exit 0
8 # It is not safe to start if we don't have a default configuration...
9 if [ ! -f /etc/default/dhcp-server ]; then
10 echo "/etc/default/dhcp-server does not exist! - Aborting..."
14 # Read init script configuration (so far only interfaces the daemon
16 . /etc/default/dhcp-server
20 echo -n "Starting DHCP server: "
21 test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/
22 test -f /var/lib/dhcp/dhcpd.leases || touch /var/lib/dhcp/dhcpd.leases
23 start-stop-daemon -S -x /usr/sbin/dhcpd -- -q $INTERFACES
27 echo -n "Stopping DHCP server: dhcpd3"
28 start-stop-daemon -K -x /usr/sbin/dhcpd
31 restart | force-reload)
35 if [ "$?" != "0" ]; then
40 echo "Usage: /etc/init.d/dhcp-server {start|stop|restart|force-reload}"