diff options
author | barner <barner@FreeBSD.org> | 2005-12-12 17:51:34 +0800 |
---|---|---|
committer | barner <barner@FreeBSD.org> | 2005-12-12 17:51:34 +0800 |
commit | a2cd3a7d23895ca9f595df7123225b52747231f7 (patch) | |
tree | f54aeb4d4f7933aa1bc99d649693969ef5101311 /net | |
parent | 5b9763a12a199c0c74b12bd639a7ed5b0ee4587e (diff) | |
download | freebsd-ports-gnome-a2cd3a7d23895ca9f595df7123225b52747231f7.tar.gz freebsd-ports-gnome-a2cd3a7d23895ca9f595df7123225b52747231f7.tar.zst freebsd-ports-gnome-a2cd3a7d23895ca9f595df7123225b52747231f7.zip |
Add dualserver 1.0, combined DHCP/DNS server for small LANs.
PR: ports/90216
Submitted by: Gabor Kovesdan
Diffstat (limited to 'net')
-rw-r--r-- | net/Makefile | 1 | ||||
-rw-r--r-- | net/dualserver/Makefile | 42 | ||||
-rw-r--r-- | net/dualserver/distinfo | 3 | ||||
-rw-r--r-- | net/dualserver/files/dualserver.sh.in | 27 | ||||
-rw-r--r-- | net/dualserver/files/extra-patch-dualserver.cpp | 66 | ||||
-rw-r--r-- | net/dualserver/files/extra-patch-dualserver.h | 11 | ||||
-rw-r--r-- | net/dualserver/pkg-descr | 6 |
7 files changed, 156 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile index 27f996965cd2..3e6f3a217662 100644 --- a/net/Makefile +++ b/net/Makefile @@ -116,6 +116,7 @@ SUBDIR += dosdetector SUBDIR += dtcp SUBDIR += dtcpclient + SUBDIR += dualserver SUBDIR += easysoap SUBDIR += echoping SUBDIR += edonkey-gui-gtk diff --git a/net/dualserver/Makefile b/net/dualserver/Makefile new file mode 100644 index 000000000000..28d8da9f78a6 --- /dev/null +++ b/net/dualserver/Makefile @@ -0,0 +1,42 @@ +# Ports collection Makefile for: dualserver +# Date created: 10 Dec 2005 +# Whom: Gabor Kovesdan +# $FreeBSD$ + +PORTNAME= dualserver +PORTVERSION= 1.0 +CATEGORIES= net dns +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= dhcp-dns-server +DISTNAME= ${PORTNAME}V${PORTVERSION} + +MAINTAINER= gkovesdan@t-hosting.hu +COMMENT= Combined DHCP/DNS server for small LANs + +USE_REINPLACE= YES +USE_RC_SUBR= dualserver.sh +WRKSRC= ${WRKDIR}/${PORTNAME} +PLIST_FILES= sbin/dualserver etc/dualserver.conf.sample + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 500000 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-dualserver.h \ + ${FILESDIR}/extra-patch-dualserver.cpp +.endif + +post-patch: + ${REINPLACE_CMD} 's/[[:cntrl:]]*$$//' ${WRKSRC}/dualserver.cpp + ${REINPLACE_CMD} 's/[[:cntrl:]]*$$//' ${WRKSRC}/dualserver.h + ${REINPLACE_CMD} 's/[[:cntrl:]]*$$//' ${WRKSRC}/dualserver.ini + ${REINPLACE_CMD} 's|/etc/dualserver.ini|${PREFIX}/etc/dualserver.conf|' ${WRKSRC}/dualserver.cpp + ${REINPLACE_CMD} 's|/etc/dualserver.state|/var/run/dualserver.state|' ${WRKSRC}/dualserver.cpp + +do-build: + ${CXX} -o ${WRKSRC}/dualserver ${WRKSRC}/dualserver.cpp + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/dualserver ${PREFIX}/sbin + ${INSTALL_DATA} ${WRKSRC}/dualserver.ini ${PREFIX}/etc/dualserver.conf.sample + +.include <bsd.port.post.mk> diff --git a/net/dualserver/distinfo b/net/dualserver/distinfo new file mode 100644 index 000000000000..00657652ef25 --- /dev/null +++ b/net/dualserver/distinfo @@ -0,0 +1,3 @@ +MD5 (dualserverV1.0.tar.gz) = 279703af257c78a0f123cec194d8bdb8 +SHA256 (dualserverV1.0.tar.gz) = 37d0c6f8fd802bc94badae6b6043e3754ab5fa6781a271e8503457ca7d0faf8a +SIZE (dualserverV1.0.tar.gz) = 39140 diff --git a/net/dualserver/files/dualserver.sh.in b/net/dualserver/files/dualserver.sh.in new file mode 100644 index 000000000000..619fdebab80e --- /dev/null +++ b/net/dualserver/files/dualserver.sh.in @@ -0,0 +1,27 @@ +#!/bin/sh +# + +# PROVIDE: dualserver +# REQUIRE: SERVERS +# BEFORE: +# KEYWORD: FreeBSD shutdown + +. /etc/rc.subr + +name="dualserver" +rcvar=`set_rcvar` +start_cmd="dualserver_startcmd" +stop_cmd="dualserver_stopcmd" + +dualserver_startcmd () +{ +%%PREFIX%%/sbin/dualserver +} + +dualserver_stopcmd () +{ +killall dualserver +} + +load_rc_config $name +run_rc_command "$1" diff --git a/net/dualserver/files/extra-patch-dualserver.cpp b/net/dualserver/files/extra-patch-dualserver.cpp new file mode 100644 index 000000000000..2cedfe5194de --- /dev/null +++ b/net/dualserver/files/extra-patch-dualserver.cpp @@ -0,0 +1,66 @@ +--- dualserver.cpp.orig Mon Dec 12 10:41:03 2005 ++++ dualserver.cpp Mon Dec 12 10:43:53 2005 +@@ -349,8 +349,8 @@ + else
+ {
+ req->dnsp.header.ancount = 0;
+- req->dnsp.header.rcode = 3;
+- req->dnsp.header.ra = 0;
++ req->dnsp.header.flags.rcode = 3;
++ req->dnsp.header.flags.ra = 0;
+ }
+
+ if (cfig->servers[0])
+@@ -364,8 +364,8 @@ + req->dnsp.header.adcount = 0;
+ }
+
+- req->dnsp.header.qr = 1;
+- req->dnsp.header.aa = 1;
++ req->dnsp.header.flags.qr = 1;
++ req->dnsp.header.flags.aa = 1;
+
+ char *raw = req->dnsp.data;
+
+@@ -495,7 +495,7 @@ + if (!cfig->servers[0])
+ glocal(cfig);
+
+- if (ntohs(req->dnsp.header.qdcount) == 1 && ntohs(req->dnsp.header.opcode) == 0)
++ if (ntohs(req->dnsp.header.qdcount) == 1 && ntohs(req->dnsp.header.flags.opcode) == 0)
+ {
+ char *raw = req->dnsp.data;
+ strcpy(req->raw_query, raw);
+@@ -619,7 +619,7 @@ +
+ WORD fdnmess(data5 *req, data2 *cfig)
+ {
+- if (!req->dnsp.header.rd)
++ if (!req->dnsp.header.flags.rd)
+ return 0;
+
+ if (!cfig->dns[0])
+@@ -679,10 +679,10 @@ + else
+ {
+ req->dnsp.header.ancount = 0;
+- req->dnsp.header.rcode = 3;
+- req->dnsp.header.ra = 0;
+- req->dnsp.header.qr = 1;
+- req->dnsp.header.aa = 0;
++ req->dnsp.header.flags.rcode = 3;
++ req->dnsp.header.flags.ra = 0;
++ req->dnsp.header.flags.qr = 1;
++ req->dnsp.header.flags.aa = 0;
+ req->BytesReady = req->BytesRecd;
+ return 0;
+ }
+@@ -754,7 +754,7 @@ + if (!found)
+ req->BytesReady = 0;
+
+- req->dnsp.header.aa = 0;
++ req->dnsp.header.flags.aa = 0;
+ return req->BytesReady;
+ }
+
diff --git a/net/dualserver/files/extra-patch-dualserver.h b/net/dualserver/files/extra-patch-dualserver.h new file mode 100644 index 000000000000..e9b922fb68c8 --- /dev/null +++ b/net/dualserver/files/extra-patch-dualserver.h @@ -0,0 +1,11 @@ +--- dualserver.h.orig Mon Dec 12 10:40:55 2005 ++++ dualserver.h Mon Dec 12 10:41:23 2005 +@@ -94,7 +94,7 @@ + BYTE rcode:4;
+ BYTE z:3;
+ BYTE ra:1;
+- };
++ } flags;
+ };
+ union {
+ WORD zcount;
diff --git a/net/dualserver/pkg-descr b/net/dualserver/pkg-descr new file mode 100644 index 000000000000..c21be9ed5f9f --- /dev/null +++ b/net/dualserver/pkg-descr @@ -0,0 +1,6 @@ +Combined DHCP/DNS Server for Small LAN. Dynamic DHCP allocates/renew host +addresses while Caching DNS Server first try resolving from DHCP alotted +names then from Cache then only forwarding to External DNS Servers. Auto +Config and auto Dynamic DNS update. + +WWW: http://sourceforge.net/projects/dhcp-dns-server/ |