aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorsem <sem@FreeBSD.org>2007-12-18 00:41:50 +0800
committersem <sem@FreeBSD.org>2007-12-18 00:41:50 +0800
commit0180669a58cbea0125517a5a9d548e3effe49334 (patch)
tree7e10eb249698fd71a2586f69953bbc45f48d7d7c /net
parent436db6421976a1ff58b78403f1254cd68bd03afc (diff)
downloadfreebsd-ports-gnome-0180669a58cbea0125517a5a9d548e3effe49334.tar.gz
freebsd-ports-gnome-0180669a58cbea0125517a5a9d548e3effe49334.tar.zst
freebsd-ports-gnome-0180669a58cbea0125517a5a9d548e3effe49334.zip
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 distributed under BSD license.
Diffstat (limited to 'net')
-rw-r--r--net/Makefile1
-rw-r--r--net/dhcprelya/Makefile28
-rw-r--r--net/dhcprelya/distinfo3
-rw-r--r--net/dhcprelya/files/dhcprelya.in43
-rw-r--r--net/dhcprelya/pkg-descr21
5 files changed, 96 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index a75d18915c1c..3712cbc4216c 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -111,6 +111,7 @@
SUBDIR += dhcperf
SUBDIR += dhcping
SUBDIR += dhcprelay
+ SUBDIR += dhcprelya
SUBDIR += dictd
SUBDIR += dictd-database
SUBDIR += dimes
diff --git a/net/dhcprelya/Makefile b/net/dhcprelya/Makefile
new file mode 100644
index 000000000000..8d8f11c8d8bc
--- /dev/null
+++ b/net/dhcprelya/Makefile
@@ -0,0 +1,28 @@
+# New ports collection makefile for: dhcprelya
+# Date created: 17 December 2007
+# Whom: Sergey Matveychuk <sem@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= dhcprelya
+PORTVERSION= 1.0
+CATEGORIES= net
+MASTER_SITES= http://people.yandex-team.ru/~sem/
+
+MAINTAINER= sem@FreeBSD.org
+COMMENT= Lightweigh DHCP relay agent. Yandex edition
+
+USE_RC_SUBR= dhcprelya
+
+PORTDOCS= README
+
+PLIST_FILES= sbin/${PORTNAME}
+
+post-install:
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/net/dhcprelya/distinfo b/net/dhcprelya/distinfo
new file mode 100644
index 000000000000..a788816002ce
--- /dev/null
+++ b/net/dhcprelya/distinfo
@@ -0,0 +1,3 @@
+MD5 (dhcprelya-1.0.tar.gz) = 2c49da069a981e585cfe6cfdb8e7b478
+SHA256 (dhcprelya-1.0.tar.gz) = 89fd168d9e6492a1a82841fbf137935404c5966f20db28bf2ad21dc2b8a933c8
+SIZE (dhcprelya-1.0.tar.gz) = 8882
diff --git a/net/dhcprelya/files/dhcprelya.in b/net/dhcprelya/files/dhcprelya.in
new file mode 100644
index 000000000000..b8283fe47088
--- /dev/null
+++ b/net/dhcprelya/files/dhcprelya.in
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# PROVIDE: dhcprelya
+# REQUIRE: DAEMON
+#
+# Add the following line to /etc/rc.conf to enable dhcrelay:
+#
+# dhcprelya_enable="YES"
+# dhcprelya_servers="<your_dhcp_server>..."
+# dhcprelya_ifaces="<if1>..."
+#
+
+# override these variables in /etc/rc.conf
+dhcprelya_enable=${dhcprelya_enable:-"NO"}
+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"
+ exit 1
+ fi
+
+ ifaces=
+ for iface in ${dhcprelya_ifaces}; do
+ ifaces="${ifaces} -i ${iface}"
+ done
+
+ rc_flags="${rc_flags} ${ifaces} ${dhcprelya_servers}"
+}
+
+. %%RC_SUBR%%
+
+name=dhcprelya
+rcvar=$(set_rcvar)
+pidfile=/var/run/${name}.pid
+command=/usr/local/sbin/${name}
+
+start_precmd=${name}_precmd
+
+load_rc_config ${name}
+run_rc_command "$1"
diff --git a/net/dhcprelya/pkg-descr b/net/dhcprelya/pkg-descr
new file mode 100644
index 000000000000..023183a68bdc
--- /dev/null
+++ b/net/dhcprelya/pkg-descr
@@ -0,0 +1,21 @@
+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 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.
+
+Sergey Matveychuk <sem@FreeBSD.org>