#!/bin/bash

# startDHCPD
#
# Usage:
#    startDHCPD  
#
# Description:
#    This script starts the DHCPD daemon for the console
#
# Return Codes
#    0: normal script termination; no unrecoverable errors
#    1: error starting the DHCPD daemon
#
# Module History
#    00  10/13/2003  T. Forties  - Initial Release
#    00  02/08/2004  T. Forties  - Start DHCPD without specifying lan by name

LANID=$1

# Dump out the process id of the DHCP daemon that is currently running
echo pidofproc /usr/sbin/dhcpd
pidofproc /usr/sbin/dhcpd

# stop the dhcpd daemon (no harm if it's not running)
echo "/etc/init.d/dhcpd stop"
/etc/init.d/dhcpd stop

# start the dhcpd daemon
echo "/usr/sbin/dhcpd -d -f"
#/usr/sbin/dhcpd  >/dev/null 2>&1 &
/usr/sbin/dhcpd  &

# Dump out the process id of the DHCP daemon that we just started
echo pidofproc /usr/sbin/dhcpd
pidofproc /usr/sbin/dhcpd
