3 # $Id: dhcp3-server.init.d,v 1.4 2003/07/13 19:12:41 mdz Exp $
8 # On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
9 # Separate multiple interfaces with spaces, e.g. "eth0 eth1".
13 # It is not safe to start if we don't have a default configuration...
14 echo "/etc/init.d/dhcp-server not yet configured! - Aborting..."
19 test -f /usr
/sbin
/dhcpd ||
exit 0
24 echo -n "Starting DHCP server: "
25 test -d /var
/lib
/dhcp
/ || mkdir
-p /var
/lib
/dhcp
/
26 test -f /var
/lib
/dhcp
/dhcpd.leases ||
touch /var
/lib
/dhcp
/dhcpd.leases
27 start-stop-daemon
-S -x /usr
/sbin
/dhcpd
-- -q $INTERFACES
31 echo -n "Stopping DHCP server: dhcpd3"
32 start-stop-daemon
-K -x /usr
/sbin
/dhcpd
35 restart | force-reload
)
39 if [ "$?" != "0" ]; then
44 echo "Usage: /etc/init.d/dhcp-server {start|stop|restart|force-reload}"