summaryrefslogtreecommitdiff
path: root/net/rinetd
diff options
context:
space:
mode:
Diffstat (limited to 'net/rinetd')
-rw-r--r--net/rinetd/DESCR5
-rw-r--r--net/rinetd/Makefile30
-rw-r--r--net/rinetd/PLIST3
-rw-r--r--net/rinetd/distinfo7
-rw-r--r--net/rinetd/files/rinetd.sh19
-rw-r--r--net/rinetd/patches/patch-aa17
-rw-r--r--net/rinetd/patches/patch-ab30
-rw-r--r--net/rinetd/patches/patch-ac42
8 files changed, 153 insertions, 0 deletions
diff --git a/net/rinetd/DESCR b/net/rinetd/DESCR
new file mode 100644
index 00000000000..8d1ab604fdb
--- /dev/null
+++ b/net/rinetd/DESCR
@@ -0,0 +1,5 @@
+Redirects TCP connections from one IP address and port to another.
+rinetd is a single-process server which handles any number of
+connections address/port pairs. Since rinetd runs as a single
+process using nonblocking I/O, it is able to redirect a large
+number of connections without a severe impact on the machine.
diff --git a/net/rinetd/Makefile b/net/rinetd/Makefile
new file mode 100644
index 00000000000..d56ea4f2f0e
--- /dev/null
+++ b/net/rinetd/Makefile
@@ -0,0 +1,30 @@
+# $NetBSD: Makefile,v 1.1.1.1 2003/10/01 01:15:44 grant Exp $
+#
+
+DISTNAME= rinetd
+PKGNAME= ${DISTNAME}-0.62
+WRKSRC= ${WRKDIR}/${PKGNAME:S|nb*||}
+CATEGORIES= net
+MASTER_SITES= http://www.boutell.com/rinetd/http/
+
+MAINTAINER= tech-pkg@NetBSD.org
+HOMEPAGE= http://www.boutell.com/rinetd/
+COMMENT= Internet redirection server
+
+NO_CONFIGURE= # defined
+USE_PKGINSTALL= yes
+ALL_TARGET= rinetd
+
+CPPFLAGS+= -DRINETD_CONF='\"${PKG_SYSCONFDIR}/rinetd.conf\"'
+
+RCD_SCRIPTS= rinetd
+
+post-extract:
+ @cd ${WRKDIR} && ${MV} -f rinetd ${PKGNAME:S|nb*||}
+
+pre-build:
+ @${MV} -f ${WRKSRC}/rinetd.8 ${WRKSRC}/rinetd.8.pre
+ @${SED} ${FILES_SUBST_SED} ${WRKSRC}/rinetd.8.pre \
+ > ${WRKSRC}/rinetd.8
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/net/rinetd/PLIST b/net/rinetd/PLIST
new file mode 100644
index 00000000000..2dd8ed8a9d6
--- /dev/null
+++ b/net/rinetd/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2003/10/01 01:15:44 grant Exp $
+sbin/rinetd
+man/man8/rinetd.8
diff --git a/net/rinetd/distinfo b/net/rinetd/distinfo
new file mode 100644
index 00000000000..5cf1576ec7d
--- /dev/null
+++ b/net/rinetd/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1.1.1 2003/10/01 01:15:44 grant Exp $
+
+SHA1 (rinetd.tar.gz) = 2498fa03c2ef50bf924ffd0a034d5de5e3258f21
+Size (rinetd.tar.gz) = 115541 bytes
+SHA1 (patch-aa) = 885a732b1b3ea52dc0bbdad9b18ca0031fdcb889
+SHA1 (patch-ab) = 9fa5cf00111a56051a40d73293ca071c125802a0
+SHA1 (patch-ac) = 743b979bfc287bb0968e418a06cab8a8d2b6dc64
diff --git a/net/rinetd/files/rinetd.sh b/net/rinetd/files/rinetd.sh
new file mode 100644
index 00000000000..bd2f35398b5
--- /dev/null
+++ b/net/rinetd/files/rinetd.sh
@@ -0,0 +1,19 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: rinetd.sh,v 1.1.1.1 2003/10/01 01:15:44 grant Exp $
+#
+# PROVIDE: rinetd
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+
+. /etc/rc.subr
+
+name="rinetd"
+rcvar=${name}
+command="@PREFIX@/sbin/${name}"
+pidfile="/var/run/${name}.pid"
+required_files="@PKG_SYSCONFDIR@/rinetd.conf"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/net/rinetd/patches/patch-aa b/net/rinetd/patches/patch-aa
new file mode 100644
index 00000000000..3b0fc51c589
--- /dev/null
+++ b/net/rinetd/patches/patch-aa
@@ -0,0 +1,17 @@
+$NetBSD: patch-aa,v 1.1.1.1 2003/10/01 01:15:44 grant Exp $
+
+--- Makefile.orig 1999-03-02 05:41:50.000000000 +1100
++++ Makefile
+@@ -1,9 +1,7 @@
+-CFLAGS=-DLINUX -g
+-
+ rinetd: rinetd.o match.o
+- gcc rinetd.o match.o -o rinetd
++ ${CC} rinetd.o match.o -o rinetd
+
+ install: rinetd
+- install -m 700 rinetd /usr/sbin
+- install -m 644 rinetd.8 /usr/man/man8
++ ${INSTALL} -m 700 rinetd ${PREFIX}/sbin
++ ${INSTALL} -m 644 rinetd.8 ${PREFIX}/man/man8
+
diff --git a/net/rinetd/patches/patch-ab b/net/rinetd/patches/patch-ab
new file mode 100644
index 00000000000..84ca2cd235f
--- /dev/null
+++ b/net/rinetd/patches/patch-ab
@@ -0,0 +1,30 @@
+$NetBSD: patch-ab,v 1.1.1.1 2003/10/01 01:15:44 grant Exp $
+
+--- rinetd.c.orig 2003-04-15 11:19:23.000000000 +1000
++++ rinetd.c
+@@ -214,7 +214,7 @@ struct _rinetd_options
+ };
+
+ RinetdOptions options = {
+- "/etc/rinetd.conf"
++ RINETD_CONF
+ };
+
+ int readArgs (int argc,
+@@ -1362,8 +1362,6 @@ void RegisterPID(void)
+ if (pidLogFileName) {
+ pid_file_name = pidLogFileName;
+ }
+-/* add other systems with wherever they register processes */
+-#if defined(LINUX)
+ pid_file = fopen(pid_file_name, "w");
+ if (pid_file == NULL) {
+ /* non-fatal, non-Linux may lack /var/run... */
+@@ -1374,7 +1372,6 @@ void RegisterPID(void)
+ fprintf(pid_file, "%d\n", getpid());
+ fclose(pid_file);
+ }
+-#endif /* LINUX */
+ }
+
+ unsigned char nullAddress[4] = { 0, 0, 0, 0 };
diff --git a/net/rinetd/patches/patch-ac b/net/rinetd/patches/patch-ac
new file mode 100644
index 00000000000..2447c6f428a
--- /dev/null
+++ b/net/rinetd/patches/patch-ac
@@ -0,0 +1,42 @@
+$NetBSD: patch-ac,v 1.1.1.1 2003/10/01 01:15:44 grant Exp $
+
+--- rinetd.8.orig 2003-04-15 11:19:44.000000000 +1000
++++ rinetd.8
+@@ -10,14 +10,14 @@
+ .Nd internet
+ .Dq redirection server
+ .Sh SYNOPSIS
+-.Nm /usr/sbin/rinetd
++.Nm @PREFIX@/sbin/rinetd
+ .Sh VERSION
+ Version 0.62, 04/14/2003.
+ .Sh DESCRIPTION
+ .Nm rinetd
+ redirects TCP connections from one IP address and port to another. rinetd
+ is a single-process server which handles any number of connections to
+-the address/port pairs specified in the file /etc/rinetd.conf.
++the address/port pairs specified in the file @PKG_SYSCONFDIR@/rinetd.conf.
+ Since rinetd runs as a single process using nonblocking I/O, it is
+ able to redirect a large number of connections without a severe
+ impact on the machine. This makes it practical to run TCP services
+@@ -26,9 +26,9 @@ redirect FTP, because FTP requires more
+ .Pp
+ rinetd is typically launched at boot time, using the following syntax:
+ .Pp
+-/usr/sbin/rinetd
++@PREFIX@/sbin/rinetd
+ .Pp
+-The configuration file is found in the file /etc/rinetd.conf, unless
++The configuration file is found in the file @PKG_SYSCONFDIR@/rinetd.conf, unless
+ another file is specified using the -c command line option.
+ .Sh FORWARDING RULES
+ Most entries in the configuration file are forwarding rules. The
+@@ -157,7 +157,7 @@ The -v command line option displays the
+ The kill -1 signal (SIGHUP) can be used to cause rinetd
+ to reload its configuration file without interrupting existing
+ connections.
+-Under Linux\(tm the process id is saved in the file \fI/var/run/rinetd.pid\fR
++The process id is saved in the file \fI/var/run/rinetd.pid\fR
+ to facilitate the kill -HUP. An alternate
+ filename can be provided by using the <code>pidlogfile</code>
+ configuration file option.