#!/bin/sh
########################################################################
# Begin dhcp
#
# Description : Start dhcp daemon
#
# Author      : 
#
# Version     : LFS 7.0
#
########################################################################

### BEGIN INIT INFO
# Provides:            dhcp
# Required-Start:      network
# Should-Start:
# Required-Stop:       sendsignals
# Should-Stop:
# Default-Start:       3 4 5
# Default-Stop:        0 1 2 6
# Short-Description:   Starts the dhcp server
# Description:         Starts the dhcp server to provide IP addresses.
# X-LFS-Provided-By:   LFS
### END INIT INFO

. /lib/lsb/init-functions
# Begin $rc_base/init.d/dhcp

#$LastChangedBy: ken $
#$Date: 2011-11-28 15:43:33 +0000 (Mon, 28 Nov 2011) $

case "$1" in
   start)
      log_info_msg "Starting DHCP Server..."
      start_daemon /usr/sbin/dhcpd -q eth1
      evaluate_retval
      ;;

   stop)
      log_info_msg "Stopping DHCP Server..."
      killproc /usr/sbin/dhcpd
      evaluate_retval
      ;;

   restart)
      $0 stop
      sleep 1
      $0 start
      ;;

   status)
      statusproc /usr/sbin/dhcpd
      ;;

   *)
      echo "Usage: $0 {start|stop|restart|status}"
      exit 1
      ;;
esac

# End $rc_base/init.d/dhcp
