5 # description: DHCP Server
7 # Source function library
8 . /etc/rc.d/init.d/functions
11 . /etc/sysconfig/network
14 [ -f /etc/sysconfig/dhcp ] && . /etc/sysconfig/dhcp
16 # Check that networking is up.
17 if [ "${NETWORKING}" = "no" ]; then
18 echo "WARNING: Networking is down. Dhcpd sercice can't be runed."
23 # See how we were called.
26 # Check if the service is already running?
27 if [ ! -f /var/lock/subsys/dhcpd ]; then
31 echo "dhcpd already is running"
33 touch /var/lock/subsys/dhcpd
34 show Starting DHCP Server
36 touch /var/lock/subsys/dhcpd
39 show Stopping DHCP Server
41 rm -f /var/run/dhcpd.pid
42 rm -f /var/lock/subsys/dhcpd
52 echo "Usage: $0 {start|stop|restart|reload|status}"