35f156983b
3.0pl2-6.16 - Fix location of ntp driftfile 3.0pl2-6.15 - Bump Release 3.0pl2-6.14 - Add div0 patch 3.0pl2-6.13 - Add SEARCH to client script 3.0pl2-6.12 - Bump Release 3.0pl2-6.11 - Add configtest 3.0pl2-6.10 - increment for base 3.0pl2-6.9 - Don't update resolv.conf on renewals 3.0pl2-6.8 - increment for base 3.0pl2-6.7 - Fix name of driftfile 3.0pl2-6.6 - increment for base 3.0pl2-6.5 - Change dhcrelay script to check DHCPSERVERS 3.0pl2-6.4 - increment for base 3.0pl2-6.3 - Fix dhclient-script to support PEERNTP and PEERNIS flags. - patch submitted by aoliva@redhat.com 3.0pl2-6.1 - add epoch to dhcp-devel versioned requires on dhcp - build for RHEL Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com> - rebuilt Tue May 27 2003 Dan Walsh <dwalsh@redhat.com> 3.0pl2-5 - Fix memory leak in parser. Mon May 19 2003 Dan Walsh <dwalsh@redhat.com> 3.0pl2-4 - Change Rev for RHEL Mon May 19 2003 Dan Walsh <dwalsh@redhat.com> 3.0pl2-3 - Change example to not give out 255 address. Tue Apr 29 2003 Dan Walsh <dwalsh@redhat.com> 3.0pl2-2 - Change Rev for RHEL Mon Apr 28 2003 Dan Walsh <dwalsh@redhat.com> 3.0pl2-1 - upgrade to 3.0pl2 Wed Mar 26 2003 Dan Walsh <dwalsh@redhat.com> 3.0pl1-26 - add usage for dhcprelay -c - add man page for dhcprelay -c Fri Mar 07 2003 Dan Walsh <dwalsh@redhat.com> 3.0pl1-25 - Fix man dhcpd.conf man page Tue Mar 04 2003 Dan Walsh <dwalsh@redhat.com> 3.0pl1-24 - Fix man dhcpctl.3 page
81 lines
1.3 KiB
Bash
81 lines
1.3 KiB
Bash
#!/bin/sh
|
|
#
|
|
# dhcpd This shell script takes care of starting and stopping
|
|
# dhcpd.
|
|
#
|
|
# chkconfig: - 65 35
|
|
# description: dhcpd provide access to Dynamic Host Control Protocol.
|
|
|
|
# Source function library.
|
|
. /etc/rc.d/init.d/functions
|
|
|
|
# Source networking configuration.
|
|
. /etc/sysconfig/network
|
|
. /etc/sysconfig/dhcpd
|
|
|
|
# Check that networking is up.
|
|
[ ${NETWORKING} = "no" ] && exit 0
|
|
|
|
[ -f /usr/sbin/dhcpd ] || exit 0
|
|
[ -f /etc/dhcpd.conf ] || exit 0
|
|
[ -f /var/lib/dhcp/dhcpd.leases ] || exit 0
|
|
|
|
RETVAL=0
|
|
prog="dhcpd"
|
|
|
|
start() {
|
|
# Start daemons.
|
|
echo -n $"Starting $prog: "
|
|
daemon /usr/sbin/dhcpd ${DHCPDARGS}
|
|
RETVAL=$?
|
|
echo
|
|
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcpd
|
|
return $RETVAL
|
|
}
|
|
|
|
stop() {
|
|
# Stop daemons.
|
|
echo -n $"Shutting down $prog: "
|
|
killproc dhcpd
|
|
RETVAL=$?
|
|
echo
|
|
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dhcpd
|
|
return $RETVAL
|
|
}
|
|
|
|
# See how we were called.
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
restart|reload)
|
|
stop
|
|
start
|
|
RETVAL=$?
|
|
;;
|
|
condrestart)
|
|
if [ -f /var/lock/subsys/dhcpd ]; then
|
|
stop
|
|
start
|
|
RETVAL=$?
|
|
fi
|
|
;;
|
|
configtest)
|
|
dhcpd -t
|
|
RETVAL=$?
|
|
;;
|
|
status)
|
|
status dhcpd
|
|
RETVAL=$?
|
|
;;
|
|
*)
|
|
echo $"Usage: $0 {start|stop|restart|condrestart|configtest|status}"
|
|
exit 1
|
|
esac
|
|
|
|
exit $RETVAL
|
|
|