ports/134239: [patch] rc script for net-p2p/py-bittornado

Christopher Cowart ccowart at rescomp.berkeley.edu
Tue May 5 18:00:15 UTC 2009


>Number:         134239
>Category:       ports
>Synopsis:       [patch] rc script for net-p2p/py-bittornado
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 05 18:00:10 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Christopher Cowart
>Release:        7.0
>Organization:
UC Berkeley
>Environment:
FreeBSD dev-aux.rescomp.berkeley.edu 7.0-RELEASE-p6 FreeBSD 7.0-RELEASE-p6 #3: Mon Dec  8 16:42:41 PST 2008     root at dev-aux.rescomp.berkeley.edu:/usr/obj/usr/src/sys/AUX  i386
>Description:
While the port has a sample startup script, it doesn't make use of rc.subr.
>How-To-Repeat:

>Fix:
Attached patch.

Patch attached with submission follows:

diff -Nrub py-bittornado/Makefile py-bittornado.new/Makefile
--- py-bittornado/Makefile	2009-05-05 10:31:27.000000000 -0700
+++ py-bittornado.new/Makefile	2009-05-05 10:36:38.000000000 -0700
@@ -7,7 +7,7 @@
 
 PORTNAME=	BitTornado
 PORTVERSION=	0.3.18
-PORTREVISION=	3
+PORTREVISION=	4
 PORTEPOCH=	1
 CATEGORIES?=	net-p2p python ipv6
 MASTER_SITES=	http://download.bittornado.com/download/ \
@@ -28,6 +28,8 @@
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-CVS
 
+USE_RC_SUBR=	bttrack
+
 DOC_FILES1=	BUILD.windows.txt FAQ.txt IMPORTANT-multitracker-readme.txt \
 		INSTALL.unix.txt credits.txt multitracker-spec.txt \
 		README-Psyco.txt webseed-spec.txt
diff -Nrub py-bittornado/files/bttrack.in py-bittornado.new/files/bttrack.in
--- py-bittornado/files/bttrack.in	1969-12-31 16:00:00.000000000 -0800
+++ py-bittornado.new/files/bttrack.in	2009-05-05 10:39:41.000000000 -0700
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: bttrack
+# REQUIRE: DAEMON
+#
+# Add the following lines to /etc/rc.conf to enable this service:
+#
+# bttrack_enable:	    Set to NO by default. 
+#                       Set it to YES to enable the tracker.
+# bttrack_dfile:        Defaults to /var/run/${name}.dfile.
+#                       Stores state for tracker.
+# bttrack_port:         Set to listen on an alternative port (default is 80).
+# 
+#
+
+. %%RC_SUBR%%
+
+name=bttrack
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/bin/${name}.py
+command_args="&"
+command_interpreter=`head -n 1 $command | awk -F! '{print $2}'`
+
+load_rc_config ${name}
+
+: ${bttrack_enable:="NO"}
+: ${bttrack_pidfile:=/var/run/${name}.pid}
+: ${bttrack_dfile:=/var/run/${name}.dfile}
+bttrack_flags="--dfile ${bttrack_dfile} \
+    ${bttrack_port:+--port ${bttrack_port}} \
+    ${bttrack_flags}"
+
+run_rc_command "$1"


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list