5 # description: DHCP Server
7 # Source function library
8 . /etc/rc.d/init.d/functions
11 . /etc/sysconfig/network
14 [ -f /etc/sysconfig/dhcpd ] && . /etc/sysconfig/dhcpd
16 # Check that networking is up.
17 if is_no "${NETWORKING}"; then
18 msg_network_down DHCPD
22 # See how we were called.
25 # Check if the service is already running?
26 if [ ! -f /var/lock/subsys/dhcpd ]; then
27 msg_starting "DHCP Server"
28 daemon dhcpd $DHCPD_INTERFACES
30 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcpd
32 msg_already_running DHCPD
37 msg_stopping "DHCP Server"
39 rm -f /var/run/dhcpd.pid
40 rm -f /var/lock/subsys/dhcpd
50 msg_usage "$0 {start|stop|restart|reload|status}"