aboutsummaryrefslogtreecommitdiff
path: root/net/dhcprelya
diff options
context:
space:
mode:
authorSergey Matveychuk <sem@FreeBSD.org>2008-09-23 12:54:27 +0000
committerSergey Matveychuk <sem@FreeBSD.org>2008-09-23 12:54:27 +0000
commit194b764b07bb4a6aa228a89dec384c6b192070c0 (patch)
treee2723e86fda263fadca422db2956ab5e4d4f7c20 /net/dhcprelya
parent71500be553389e34da4bc23e6966c931be4df7b0 (diff)
downloadports-194b764b07bb4a6aa228a89dec384c6b192070c0.tar.gz
ports-194b764b07bb4a6aa228a89dec384c6b192070c0.zip
- Update to 2.0
Notes
Notes: svn path=/head/; revision=220555
Diffstat (limited to 'net/dhcprelya')
-rw-r--r--net/dhcprelya/Makefile2
-rw-r--r--net/dhcprelya/distinfo6
-rw-r--r--net/dhcprelya/files/dhcprelya.in29
-rw-r--r--net/dhcprelya/pkg-descr16
4 files changed, 28 insertions, 25 deletions
diff --git a/net/dhcprelya/Makefile b/net/dhcprelya/Makefile
index 2d8e5cbf496f..3dde04569c94 100644
--- a/net/dhcprelya/Makefile
+++ b/net/dhcprelya/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= dhcprelya
-PORTVERSION= 1.3
+PORTVERSION= 2.0
CATEGORIES= net
MASTER_SITES= http://people.yandex-team.ru/~sem/
diff --git a/net/dhcprelya/distinfo b/net/dhcprelya/distinfo
index 0c340f640aa1..429cb3a9867c 100644
--- a/net/dhcprelya/distinfo
+++ b/net/dhcprelya/distinfo
@@ -1,3 +1,3 @@
-MD5 (dhcprelya-1.3.tar.gz) = e6f0d9ced49041f51e1e4226049cdc40
-SHA256 (dhcprelya-1.3.tar.gz) = 527c1385eb50141351c186afe9d186dd18665361dcfded98c473578343e00faa
-SIZE (dhcprelya-1.3.tar.gz) = 9275
+MD5 (dhcprelya-2.0.tar.gz) = bee5ecc651f24deec1a46db7ee065ee1
+SHA256 (dhcprelya-2.0.tar.gz) = ed8a4f0ebfad3e3165614e16e105fd5bb54849497b25e61a15c9425ec2d3c950
+SIZE (dhcprelya-2.0.tar.gz) = 10307
diff --git a/net/dhcprelya/files/dhcprelya.in b/net/dhcprelya/files/dhcprelya.in
index b8283fe47088..73f00b91ddf5 100644
--- a/net/dhcprelya/files/dhcprelya.in
+++ b/net/dhcprelya/files/dhcprelya.in
@@ -6,28 +6,40 @@
# Add the following line to /etc/rc.conf to enable dhcrelay:
#
# dhcprelya_enable="YES"
+#
+# dhcprelya_config="/path/to/config.file"
+# or
# dhcprelya_servers="<your_dhcp_server>..."
# dhcprelya_ifaces="<if1>..."
#
# override these variables in /etc/rc.conf
dhcprelya_enable=${dhcprelya_enable:-"NO"}
+dhcprelya_config=${dhcprelya_config:-}
dhcprelya_servers=${dhcprelya_servers:-} # dhcprelya server(s)
dhcprelya_ifaces=${dhcprelya_ifaces:-} # ethernet interface(s)
dhcprelya_precmd ()
{
- if [ -z "${dhcprelya_ifaces}" -o -z "${dhcprelya_servers}" ]; then
- echo "Both dhcprelya_ifaces and dhcprelya_servers must be set in /etc/rc.conf"
+ if [ -z "${dhcprelya_config}" ]; then
+ if [ -z "${dhcprelya_ifaces}" -o -z "${dhcprelya_servers}" ]; then
+ echo "Either dhcprelya_config or both dhcprelya_ifaces and dhcprelya_servers must be set in /etc/rc.conf"
exit 1
- fi
+ fi
- ifaces=
- for iface in ${dhcprelya_ifaces}; do
+ ifaces=
+ for iface in ${dhcprelya_ifaces}; do
ifaces="${ifaces} -i ${iface}"
- done
+ done
+
+ rc_flags="${rc_flags} ${ifaces} ${dhcprelya_servers}"
+ else
+ rc_flags="${rc_flags} -f ${dhcprelya_config}"
+ fi
+}
- rc_flags="${rc_flags} ${ifaces} ${dhcprelya_servers}"
+dhcprelya_postcmd() {
+ rm -f ${pidfile}
}
. %%RC_SUBR%%
@@ -35,9 +47,10 @@ dhcprelya_precmd ()
name=dhcprelya
rcvar=$(set_rcvar)
pidfile=/var/run/${name}.pid
-command=/usr/local/sbin/${name}
+command=%%PREFIX%%/sbin/${name}
start_precmd=${name}_precmd
+stop_postcmd=${name}_postcmd
load_rc_config ${name}
run_rc_command "$1"
diff --git a/net/dhcprelya/pkg-descr b/net/dhcprelya/pkg-descr
index 023183a68bdc..55944de5f5ba 100644
--- a/net/dhcprelya/pkg-descr
+++ b/net/dhcprelya/pkg-descr
@@ -1,21 +1,11 @@
dhcprelya is a light DHCP relay agent written for Yandex company for
high loaded routers with tens interfaces and thousands hosts behind them.
-It's fast and does not depend on any side library. Some ideas was
-taken from Edwin's dhcprelay (net/dhcprelay) which has some shortages.
+It's fast, independed from any side libraries, and it does not turn on
+a promisc mode for listen interfaces.
It's distributed under BSD license.
-How to run:
-
-dhcprelya [-d] [-p<pidfile>] -i<if1>... -i<ifN> <server1>... <serverN>
-
--d - do not demonize and output debugging info onto terminal.
--p - use not default pid file. You can run more than one copy of
- dhcprelya.
--i - an interfaces list these should be listened.
-server - a servers list where request will be forward to.
-
-Any questions, bug reports and feature requests are welcome.
+Read README file for instructions.
Sergey Matveychuk <sem@FreeBSD.org>