aboutsummaryrefslogtreecommitdiff
path: root/net/dhcprelya
diff options
context:
space:
mode:
authorSergey Matveychuk <sem@FreeBSD.org>2007-12-17 16:41:50 +0000
committerSergey Matveychuk <sem@FreeBSD.org>2007-12-17 16:41:50 +0000
commit4ead770c954bc66058091e952f0de652f35ec317 (patch)
treeacec1655d4b8ddc4e21ad518037c117fc8e4139c /net/dhcprelya
parentbbadbdebdcca420ca8f8359a8a95ec3d6093345a (diff)
downloadports-4ead770c954bc66058091e952f0de652f35ec317.tar.gz
ports-4ead770c954bc66058091e952f0de652f35ec317.zip
Notes
Diffstat (limited to 'net/dhcprelya')
-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
4 files changed, 95 insertions, 0 deletions
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>