Date: Wed, 16 Apr 2008 20:23:26 +0800 (CST) From: Jui-Nan Lin <jnlin@csie.nctu.edu.tw> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/122814: [PATCH] net/plb: New rc script Message-ID: <20080416122326.1C8C3E15E@Florence.tamama.org> Resent-Message-ID: <200804161240.m3GCe1NP071889@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080416122326.1C8C3E15E>