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
83 lines
1.4 KiB
Bash
83 lines
1.4 KiB
Bash
#!/bin/sh
|
|
#
|
|
# dhcrelay This shell script takes care of starting and stopping
|
|
# dhcrelay.
|
|
#
|
|
# chkconfig: - 66 34
|
|
# description: dhcrelay provides a relay for Dynamic Host Control Protocol.
|
|
|
|
# Source function library.
|
|
. /etc/rc.d/init.d/functions
|
|
|
|
# Source networking configuration.
|
|
. /etc/sysconfig/network
|
|
|
|
# Source dhcrelay configuration. We can't default a DHCPSERVERS entry!
|
|
if [ -f /etc/sysconfig/dhcrelay ] ; then
|
|
. /etc/sysconfig/dhcrelay
|
|
[ -n "$DHCPSERVERS" ] || exit 0
|
|
else
|
|
exit 0
|
|
fi
|
|
|
|
# Check that networking is up.
|
|
[ ${NETWORKING} = "no" ] && exit 0
|
|
|
|
[ -f /usr/sbin/dhcrelay ] || exit 0
|
|
|
|
RETVAL=0
|
|
prog="dhcrelay"
|
|
|
|
start() {
|
|
# Start daemons.
|
|
echo -n $"Starting $prog: "
|
|
daemon /usr/sbin/dhcrelay \
|
|
$([ -n "$INTERFACES" ] && for int in $INTERFACES ; do echo -n " -i $int" ; done) \
|
|
$DHCPSERVERS
|
|
RETVAL=$?
|
|
echo
|
|
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcrelay
|
|
return $RETVAL
|
|
}
|
|
|
|
stop() {
|
|
# Stop daemons.
|
|
echo -n $"Shutting down $prog: "
|
|
killproc dhcrelay
|
|
RETVAL=$?
|
|
echo
|
|
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dhcrelay
|
|
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/dhcrelay ]; then
|
|
stop
|
|
start
|
|
RETVAL=$?
|
|
fi
|
|
;;
|
|
status)
|
|
status dhcrelay
|
|
RETVAL=$?
|
|
;;
|
|
*)
|
|
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
|
|
exit 1
|
|
esac
|
|
|
|
exit $RETVAL
|