aboutsummaryrefslogtreecommitdiff
path: root/net/isc-dhcp41-server
diff options
context:
space:
mode:
authorRyan Steinmetz <zi@FreeBSD.org>2012-04-18 17:55:19 +0000
committerRyan Steinmetz <zi@FreeBSD.org>2012-04-18 17:55:19 +0000
commit0b6042298ed069914bb0d37dd8c7b14f58fcece7 (patch)
tree6a50615fbc92e75ef4f3fafaa7b92d298b290fb0 /net/isc-dhcp41-server
parent310beeb63c231d3e8fd1d51d63d46b78076fe2d3 (diff)
downloadports-0b6042298ed069914bb0d37dd8c7b14f58fcece7.tar.gz
ports-0b6042298ed069914bb0d37dd8c7b14f58fcece7.zip
- Resolve dhcrelay6 issue with rc script that prevented it from working properly.
- Bump PORTREVISION of isc-dhcp4?-relay ports Reported by: Glen Neff <glen.neff@emc.com> Approved by: Douglas Thrift <douglas@douglasthrift.net>, zi@
Notes
Notes: svn path=/head/; revision=295049
Diffstat (limited to 'net/isc-dhcp41-server')
-rw-r--r--net/isc-dhcp41-server/Makefile2
-rw-r--r--net/isc-dhcp41-server/files/isc-dhcrelay.in41
2 files changed, 37 insertions, 6 deletions
diff --git a/net/isc-dhcp41-server/Makefile b/net/isc-dhcp41-server/Makefile
index e1f0ff216516..88be067c5327 100644
--- a/net/isc-dhcp41-server/Makefile
+++ b/net/isc-dhcp41-server/Makefile
@@ -24,7 +24,7 @@ LICENSE= ISCL
PATCHLEVEL= R4
PORTREVISION_SERVER= 3
PORTREVISION_CLIENT= 0
-PORTREVISION_RELAY= 2
+PORTREVISION_RELAY= 3
SUBSYS?= server
WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}-${PATCHLEVEL}
diff --git a/net/isc-dhcp41-server/files/isc-dhcrelay.in b/net/isc-dhcp41-server/files/isc-dhcrelay.in
index 5e86a5872aac..4bba50a44c7e 100644
--- a/net/isc-dhcp41-server/files/isc-dhcrelay.in
+++ b/net/isc-dhcp41-server/files/isc-dhcrelay.in
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# $FreeBSD: /tmp/pcvs/ports/net/isc-dhcp41-server/files/isc-dhcrelay.in,v 1.4 2011-06-21 17:08:11 lev Exp $
+# $FreeBSD: /tmp/pcvs/ports/net/isc-dhcp41-server/files/isc-dhcrelay.in,v 1.5 2012-04-18 17:55:19 zi Exp $
#
# PROVIDE: dhcrelay
# REQUIRE: DAEMON
@@ -15,8 +15,11 @@
dhcrelay_enable=${dhcrelay_enable:-"NO"}
dhcrelay6_enable=${dhcrelay6_enable:-"NO"}
# dhcrelay_flags="" # command option(s)
-# dhcrelay_servers="" # dhcrelay server(s)
-# dhcrelay_ifaces="" # ethernet interface(s)
+# dhcrelay_servers="" # v4 dhcrelay server(s)
+# dhcrelay_ifaces="" # v4 ethernet interface(s)
+# dhcrelay6_lowers="" # v6 "lower" network interface(s)
+# dhcrelay6_uppers="" # v6 "upper" network interface(s)
+
case $0 in
/etc/rc*)
@@ -43,7 +46,7 @@ esac
dhcrelay_precmd ()
{
local ifaces _servers _ifaces
-
+
eval "_servers=\${${name}_servers}"
eval "_ifaces=\${${name}_ifaces}"
@@ -59,11 +62,39 @@ dhcrelay_precmd ()
rc_flags="${rc_flags} ${ipversion} ${ifaces} ${_servers}"
}
+dhcrelay6_precmd ()
+{
+ local lowers _lowers uppers _uppers
+
+ eval "_lowers=\${${name}_lowers}"
+ eval "_uppers=\${${name}_uppers}"
+
+ if [ -z "${_lowers}" ]; then
+ err 1 "no ${name} lower(s) configured."
+ fi
+
+ if [ -z "${_uppers}" ]; then
+ err 1 "no ${name} upper(s) configured."
+ fi
+
+ lowers=
+ for lower in ${_lowers}; do
+ lowers="${lowers} -l ${lower}"
+ done
+
+ uppers=
+ for upper in ${_uppers}; do
+ uppers="${uppers} -u ${upper}"
+ done
+
+ rc_flags="${rc_flags} ${ipversion} ${lowers} ${uppers}"
+}
+
. /etc/rc.subr
rcvar=${name}_enable
-command=%%PREFIX%%/sbin/${name}
+command=%%PREFIX%%/sbin/dhcrelay
pidfile=/var/run/${name}.pid
start_precmd=${name}_precmd