ports/70862: [MAINTAINER] misc/proxyper: Use RCNG
Tim Bishop
tim at bishnet.net
Mon Aug 23 14:20:19 UTC 2004
>Number: 70862
>Category: ports
>Synopsis: [MAINTAINER] misc/proxyper: Use RCNG
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Mon Aug 23 14:20:18 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Tim Bishop
>Release: FreeBSD 5.2.1-RELEASE-p9 i386
>Organization:
>Environment:
System: FreeBSD pendennis.ukc.ac.uk 5.2.1-RELEASE-p9 FreeBSD 5.2.1-RELEASE-p9 #1: Sun Jul 18 15:23:54 BST 2004
>Description:
- Use RCNG
Generated with FreeBSD Port Tools 0.50
>How-To-Repeat:
>Fix:
--- proxyper-341.patch begins here ---
Index: Makefile
===================================================================
RCS file: /u1/freebsd/cvs/ports/misc/proxyper/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- Makefile 2 Jun 2004 16:29:09 -0000 1.18
+++ Makefile 23 Aug 2004 13:57:41 -0000
@@ -25,6 +25,7 @@
IGNORE= "This port requires FreeBSD 3.X or greater."
.endif
+USE_RC_SUBR= yes
NO_BUILD= yes
BINDIR= ${PREFIX}/distributed.net/proxy
@@ -37,8 +38,9 @@
SHAREMODE= 644
post-extract:
- @${SED} -e 's#CHANGETHIS#${BINDIR}#' ${FILESDIR}/proxyper.sh \
- > ${WRKDIR}/proxyper.sh
+ @${SED} -e 's#%%BINDIR%%#${BINDIR}#'g \
+ -e 's#%%RC_SUBR%%#${RC_SUBR}#g' \
+ ${FILESDIR}/proxyper.sh > ${WRKDIR}/proxyper.sh
do-install:
if [ ! -d ${BINDIR} ]; then \
@@ -52,7 +54,7 @@
${INSTALL_MAN} ${WRKSRC}/ChangeLog.txt ${BINDIR}
${INSTALL_MAN} ${WRKSRC}/manual.html ${BINDIR}
- ${INSTALL_SCRIPT} ${WRKDIR}/proxyper.sh ${PREFIX}/etc/rc.d/proxyper.sh.sample
+ ${INSTALL_SCRIPT} ${WRKDIR}/proxyper.sh ${PREFIX}/etc/rc.d/proxyper.sh
${INSTALL_DATA} ${WRKSRC}/proxyper.ini ${BINDIR}/proxyper.ini.sample
.if !exists(${BINDIR}/proxyper.ini)
Index: pkg-plist
===================================================================
RCS file: /u1/freebsd/cvs/ports/misc/proxyper/pkg-plist,v
retrieving revision 1.8
diff -u -r1.8 pkg-plist
--- pkg-plist 2 Jun 2004 16:29:09 -0000 1.8
+++ pkg-plist 23 Aug 2004 13:54:41 -0000
@@ -4,6 +4,6 @@
@unexec if cmp -s %D/distributed.net/proxy/proxyper.ini %D/distributed.net/proxy/proxyper.ini.sample; then rm -f %D/distributed.net/proxy/proxyper.ini; fi
distributed.net/proxy/proxyper.ini.sample
@exec [ -f %B/proxyper.ini ] || cp %B/%f %B/proxyper.ini
-etc/rc.d/proxyper.sh.sample
+etc/rc.d/proxyper.sh
@dirrm distributed.net/proxy
@dirrm distributed.net
Index: files/proxyper.sh
===================================================================
RCS file: /u1/freebsd/cvs/ports/misc/proxyper/files/proxyper.sh,v
retrieving revision 1.3
diff -u -r1.3 proxyper.sh
--- files/proxyper.sh 2 Jun 2004 16:29:09 -0000 1.3
+++ files/proxyper.sh 23 Aug 2004 14:14:33 -0000
@@ -1,19 +1,36 @@
#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: proxyper
+# REQUIRE: LOGIN
+# KEYWORD: FreeBSD shutdown
-dir="CHANGETHIS"
+proxyper_enable=${proxyper_enable:-"NO"}
-case "$1" in
-start)
+dir="%%BINDIR%%"
+
+. %%RC_SUBR%%
+
+name="proxyper"
+rcvar=`set_rcvar`
+
+required_files=${dir}/${name}.ini
+
+start_cmd="${name}_start"
+stop_cmd="${name}_stop"
+
+proxyper_start()
+{
+ echo -n " proxyper"
+ su -m nobody -c "${dir}/proxyper" >/dev/null 2>&1 &
+}
+
+proxyper_stop()
+{
+ kill `cat ${dir}/rc5desproxy.pid`
echo -n " proxyper"
- su -m nobody -c "$dir/proxyper" 2>/dev/null >/dev/null &
- ;;
-stop)
- kill `cat $dir/rc5desproxy.pid` && echo -n " proxyper"
- ;;
-*)
- echo "Usage: `basename $0` {start|stop}" >&2
- exit 64
- ;;
-esac
+}
-exit 0
+load_rc_config $name
+run_rc_command "$1"
--- proxyper-341.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list