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 -a "$1" != stop -a "$1" != status ]; then
19 msg_network_down DHCPD
27 # See how we were called.
30 # Check if the service is already running?
31 if [ ! -f /var/lock/subsys/dhcpd ]; then
32 msg_starting "DHCP Server"
33 daemon dhcpd $DHCPD_INTERFACES
35 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcpd
37 msg_already_running DHCPD
41 if [ -f /var/lock/subsys/dhcpd ]; then
42 msg_stopping "DHCP Server"
44 rm -f /var/run/dhcpd.pid /var/lock/subsys/dhcpd >/dev/null 2>&1
59 msg_usage "$0 {start|stop|restart|force-reload|status}"