Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Mar 2016 00:29:52 +0000 (UTC)
From:      Ryan Steinmetz <zi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r411681 - in head/net/portfwd: . files
Message-ID:  <201603230029.u2N0TqEN023784@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: zi
Date: Wed Mar 23 00:29:52 2016
New Revision: 411681
URL: https://svnweb.freebsd.org/changeset/ports/411681

Log:
  - Add rc script for startup at boot
  - Don't silently install files
  - Bump PORTREVISION

Added:
  head/net/portfwd/files/portfwd.in   (contents, props changed)
Modified:
  head/net/portfwd/Makefile

Modified: head/net/portfwd/Makefile
==============================================================================
--- head/net/portfwd/Makefile	Wed Mar 23 00:26:21 2016	(r411680)
+++ head/net/portfwd/Makefile	Wed Mar 23 00:29:52 2016	(r411681)
@@ -3,6 +3,7 @@
 
 PORTNAME=	portfwd
 PORTVERSION=	0.29
+PORTREVISION=	1
 CATEGORIES=	net
 MASTER_SITES=	SF
 
@@ -15,6 +16,7 @@ OPTIONS_DEFINE=	DOCS EXAMPLES
 
 GNU_CONFIGURE=	yes
 USES=		gmake
+USE_RC_SUBR=	${PORTNAME}
 
 post-patch:
 	@${REINPLACE_CMD} -e "s|-Wall -ggdb -O3|${CFLAGS}|g" \
@@ -25,6 +27,7 @@ post-patch:
 
 post-install:
 	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
-	@${INSTALL_DATA} ${WRKSRC}/cfg/*.cfg ${STAGEDIR}${EXAMPLESDIR}
+	${INSTALL_DATA} ${WRKSRC}/cfg/*.cfg ${STAGEDIR}${EXAMPLESDIR}
+	${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/etc/rc.d
 
 .include <bsd.port.mk>

Added: head/net/portfwd/files/portfwd.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/portfwd/files/portfwd.in	Wed Mar 23 00:29:52 2016	(r411681)
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: portfwd
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following line to /etc/rc.conf to enable the portfwd daemon:
+#
+# portfwd_enable="YES"
+#
+
+. /etc/rc.subr
+
+name=portfwd
+rcvar=portfwd_enable
+
+load_rc_config ${name}
+
+: ${portfwd_enable:="NO"}
+: ${portfwd_config:="%%PREFIX%%/etc/portfwd.conf"}
+
+required_files="${portfwd_config}"
+command="/usr/sbin/daemon"
+command_args="-f -r %%PREFIX%%/sbin/portfwd -g -c ${portfwd_config}"
+
+run_rc_command "$1"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603230029.u2N0TqEN023784>