aboutsummaryrefslogtreecommitdiffstats
path: root/net/isc-dhcp41-server
diff options
context:
space:
mode:
authorzi <zi@FreeBSD.org>2012-04-19 01:55:19 +0800
committerzi <zi@FreeBSD.org>2012-04-19 01:55:19 +0800
commit0d150fb539711505d96af84f0791db4f9adc4b63 (patch)
treeaddaf31fd946e5ce451dd2f57502e76dc6933555 /net/isc-dhcp41-server
parent8ab083d74b8e587efd60b2085d63722bad6b6351 (diff)
downloadfreebsd-ports-gnome-0d150fb539711505d96af84f0791db4f9adc4b63.tar.gz
freebsd-ports-gnome-0d150fb539711505d96af84f0791db4f9adc4b63.tar.zst
freebsd-ports-gnome-0d150fb539711505d96af84f0791db4f9adc4b63.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@
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