3 # $Id: dhcp3-server.init.d,v 1.4 2003/07/13 19:12:41 mdz Exp $
6 # On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
7 # Separate multiple interfaces with spaces, e.g. "eth0 eth1".
11 test -f /usr/sbin/dhcpd || exit 0
12 test -f /etc/dhcp/dhcpd.conf || exit 0
13 test -n "$INTERFACES" || exit 0
17 echo -n "Starting DHCP server: "
18 test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/
19 test -f /var/lib/dhcp/dhcpd.leases || touch /var/lib/dhcp/dhcpd.leases
20 start-stop-daemon -S -x /usr/sbin/dhcpd -- -q $INTERFACES
21 [ $? = 0 ] && echo "OK" || echo "FAIL"
24 echo -n "Stopping DHCP server: dhcpd3"
25 start-stop-daemon -K -x /usr/sbin/dhcpd
26 [ $? = 0 ] && echo "OK" || echo "FAIL"
28 restart | force-reload)
32 if [ "$?" != "0" ]; then
37 echo "Usage: /etc/init.d/dhcp-server {start|stop|restart|force-reload}"