ports/122814: [PATCH] net/plb: New rc script
Jui-Nan Lin
jnlin at csie.nctu.edu.tw
Wed Apr 16 12:40:01 UTC 2008
>Number: 122814
>Category: ports
>Synopsis: [PATCH] net/plb: New rc script
>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: Wed Apr 16 12:40:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Jui-Nan Lin
>Release: FreeBSD 6.2-RELEASE-p9 i386
>Organization:
>Environment:
System: FreeBSD Florence.tamama.org 6.2-RELEASE-p9 FreeBSD 6.2-RELEASE-p9 #0: Fri Nov 30 03:13:43 CST 2007
>Description:
New rc script
Added file(s):
- files/plb.in
Removed file(s):
- files/plb.sh.sample
Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:
--- plb-0.3_6.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/net/plb/Makefile /home/jnlin/ports/plb/Makefile
--- /usr/ports/net/plb/Makefile Thu Jan 3 07:43:01 2008
+++ /home/jnlin/ports/plb/Makefile Wed Apr 16 20:18:47 2008
@@ -7,7 +7,7 @@
PORTNAME= plb
PORTVERSION= 0.3
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= net ipv6
MASTER_SITES= http://plb.sunsite.dk/files/
@@ -21,16 +21,12 @@
MAN8= plb.8
DOCS= AUTHORS CONTACT COPYING NEWS README THANKS TODO
+USE_RC_SUBR= ${PORTNAME}
.include <bsd.port.pre.mk>
-post-extract:
- @${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/plb.sh.sample \
- > ${WRKSRC}/plb.sh.sample
-
post-install:
${INSTALL_DATA} ${WRKSRC}/plb.conf ${PREFIX}/etc/plb.conf.sample
- ${INSTALL_SCRIPT} ${WRKSRC}/plb.sh.sample ${PREFIX}/etc/rc.d/plb.sh.sample
.if !defined(NOPORTDOCS)
@${MKDIR} ${PREFIX}/share/doc/plb
(cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${PREFIX}/share/doc/plb)
diff -ruN --exclude=CVS /usr/ports/net/plb/files/plb.in /home/jnlin/ports/plb/files/plb.in
--- /usr/ports/net/plb/files/plb.in Thu Jan 1 08:00:00 1970
+++ /home/jnlin/ports/plb/files/plb.in Wed Apr 16 20:05:03 2008
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: plb
+# REQUIRE: NETWORKING SERVERS
+# BEFORE: DAEMON
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable plb:
+# plb_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable plb
+# plb_flags (str): Set to "" by default.
+# Extra flags passed to start command
+#
+. %%RC_SUBR%%
+
+name="plb"
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/bin/plb"
+pidfile="/var/run/plb.pid"
+required_files=%%PREFIX%%/etc/plb.conf
+
+[ -z "$plb_enable" ] && plb_enable="NO"
+[ -z "$plb_flags" ] && plb_flags="-c %%PREFIX%%/etc/plb.conf -B"
+
+load_rc_config $name
+
+run_rc_command "$1"
+
diff -ruN --exclude=CVS /usr/ports/net/plb/files/plb.sh.sample /home/jnlin/ports/plb/files/plb.sh.sample
--- /usr/ports/net/plb/files/plb.sh.sample Thu Feb 27 05:17:36 2003
+++ /home/jnlin/ports/plb/files/plb.sh.sample Thu Jan 1 08:00:00 1970
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-case "$1" in
-
-start)
- if [ -x %%PREFIX%%/bin/plb ]; then
- %%PREFIX%%/bin/plb -B -c %%PREFIX%%/etc/plb.conf && echo -n ' plb'
- fi
- ;;
-
-stop)
- kill $(cat /var/run/plb.pid)
- rm -f /var/run/plb.pid
- ;;
-*)
- echo "$0 start | stop"
- ;;
-
-esac
--- plb-0.3_6.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list