ports/92391: Update port: net/redir Add rc.d script to easy startup
Marcus Alves Grando
mnag at FreeBSD.org
Thu Jan 26 20:30:09 UTC 2006
>Number: 92391
>Category: ports
>Synopsis: Update port: net/redir Add rc.d script to easy startup
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Thu Jan 26 20:30:03 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Marcus Alves Grando
>Release: FreeBSD 6.0-STABLE i386
>Organization:
Grupos Internet S/A
>Environment:
System: FreeBSD marcus.grupos.com.br 6.0-STABLE FreeBSD 6.0-STABLE #0: Thu Jan 26 09:15:10 BRST 2006 root at marcus.grupos.com.br:/usr/obj/usr/src/sys/MARCUS i386
>Description:
- Respect MANPREFIX
- Add rc.d script to easy startup
- Bump PORTREVISION
>How-To-Repeat:
>Fix:
--- redir.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/net/redir/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile 6 Feb 2004 13:12:07 -0000 1.4
+++ Makefile 26 Jan 2006 20:24:31 -0000
@@ -7,17 +7,20 @@
PORTNAME= redir
PORTVERSION= 2.2.1
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://sammy.net/~sammy/hacks/
MAINTAINER= markp at FreeBSD.org
COMMENT= A tcp connection redirection utility
+USE_RC_SUBR= redir
+
MAN1= redir.1
PLIST_FILES= bin/redir
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/redir ${PREFIX}/bin
- ${INSTALL_MAN} ${WRKSRC}/redir.man ${PREFIX}/man/man1/redir.1
+ ${INSTALL_MAN} ${WRKSRC}/redir.man ${MANPREFIX}/man/man1/redir.1
.include <bsd.port.mk>
Index: files/redir.in
===================================================================
RCS file: files/redir.in
diff -N files/redir.in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/redir.in 26 Jan 2006 20:24:31 -0000
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: redir
+# REQUIRE: DAEMON
+# KEYWORD: FreeBSD
+#
+# Add the following lines to /etc/rc.conf to enable redir:
+#
+# redir_enable (bool): Set it to "YES" to enable redir.
+# Default is "NO".
+# redir_flags (flags): Set flags to redir. see redir(1).
+# Example: --lport=80 --cport=3128 --syslog
+#
+
+. %%RC_SUBR%%
+
+name="redir"
+rcvar=`set_rcvar`
+
+load_rc_config $name
+
+: ${redir_enable="NO"}
+
+command=%%PREFIX%%/bin/redir
+command_args="${redir_flags} &"
+start_precmd="redir_flags_check"
+
+redir_flags_check()
+{
+ if [ "${redir_flags}" = "" ]; then
+ err 1 "\$redir_flags are required. see redir(1)."
+ fi
+}
+
+run_rc_command "$1"
--- redir.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list