diff options
author | Ryan Steinmetz <zi@FreeBSD.org> | 2012-04-18 17:55:19 +0000 |
---|---|---|
committer | Ryan Steinmetz <zi@FreeBSD.org> | 2012-04-18 17:55:19 +0000 |
commit | 0b6042298ed069914bb0d37dd8c7b14f58fcece7 (patch) | |
tree | 6a50615fbc92e75ef4f3fafaa7b92d298b290fb0 /net/isc-dhcp42-server | |
parent | 310beeb63c231d3e8fd1d51d63d46b78076fe2d3 (diff) | |
download | ports-0b6042298ed069914bb0d37dd8c7b14f58fcece7.tar.gz ports-0b6042298ed069914bb0d37dd8c7b14f58fcece7.zip |
Notes
Diffstat (limited to 'net/isc-dhcp42-server')
-rw-r--r-- | net/isc-dhcp42-server/Makefile | 2 | ||||
-rw-r--r-- | net/isc-dhcp42-server/files/isc-dhcrelay.in | 39 |
2 files changed, 36 insertions, 5 deletions
diff --git a/net/isc-dhcp42-server/Makefile b/net/isc-dhcp42-server/Makefile index 9eb8cd46bc4e..5425a8e70bcc 100644 --- a/net/isc-dhcp42-server/Makefile +++ b/net/isc-dhcp42-server/Makefile @@ -25,7 +25,7 @@ USE_GMAKE= yes PATCHLEVEL= P2 PORTREVISION_SERVER= 2 PORTREVISION_CLIENT= 0 -PORTREVISION_RELAY= 0 +PORTREVISION_RELAY= 1 SUBSYS?= server #WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}-${PATCHLEVEL} diff --git a/net/isc-dhcp42-server/files/isc-dhcrelay.in b/net/isc-dhcp42-server/files/isc-dhcrelay.in index 6994157835c7..f629350d25e7 100644 --- a/net/isc-dhcp42-server/files/isc-dhcrelay.in +++ b/net/isc-dhcp42-server/files/isc-dhcrelay.in @@ -14,8 +14,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*) @@ -42,7 +45,7 @@ esac dhcrelay_precmd () { local ifaces _servers _ifaces - + eval "_servers=\${${name}_servers}" eval "_ifaces=\${${name}_ifaces}" @@ -58,11 +61,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 |