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_yes "${NETWORKING}"; then
18 if [ ! -f /var/lock/subsys/network ]; then
19 msg_network_down DHCPD
26 # See how we were called.
29 # Check if the service is already running?
30 if [ ! -f /var/lock/subsys/dhcpd ]; then
31 msg_starting "DHCP Server"
32 daemon dhcpd $DHCPD_INTERFACES
34 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcpd
36 msg_already_running DHCPD
41 msg_stopping "DHCP Server"
43 rm -f /var/run/dhcpd.pid
44 rm -f /var/lock/subsys/dhcpd
54 msg_usage "$0 {start|stop|restart|reload|status}"