Date: Fri, 17 Jul 2009 07:13:02 GMT From: "Philip M. Gollucci" <pgollucci@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Cc: alex@hugo.bmg.gv.at Subject: ports/136845: [PATCH] net/ifdepd: USE_RC_SUBR != yes Message-ID: <200907170713.n6H7D2pD040935@freefall.freebsd.org> Resent-Message-ID: <200907170720.n6H7K36Z045891@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 136845 >Category: ports >Synopsis: [PATCH] net/ifdepd: USE_RC_SUBR != yes >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: Fri Jul 17 07:20:03 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Philip M. Gollucci >Release: FreeBSD 7.2-STABLE i386 >Organization: RideCharge Inc. >Environment: System: FreeBSD freefall.freebsd.org 7.2-STABLE FreeBSD 7.2-STABLE #38 r194101: Sat Jun 13 11:12:24 UTC >Description: Added file(s): - files/ifdepd.in Port maintainer (alex@hugo.bmg.gv.at) is cc'd. Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: >Fix: --- ifdepd-20050420_1.patch begins here --- Index: Makefile =================================================================== RCS file: /home/pcvs/ports/net/ifdepd/Makefile,v retrieving revision 1.4 diff -u -u -r1.4 Makefile --- Makefile 5 Jan 2009 21:36:39 -0000 1.4 +++ Makefile 17 Jul 2009 07:12:50 -0000 @@ -5,6 +5,7 @@ PORTNAME= ifdepd PORTVERSION= 20050420 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://alex.bmg.gv.at/programs/ @@ -13,15 +14,9 @@ MAN8= ifdepd.8 -PLIST_FILES= bin/ifdepd \ - etc/rc.d/ifdepd.sh +PLIST_FILES= bin/ifdepd -USE_RC_SUBR= yes - -post-patch: - @${REINPLACE_CMD} -e \ - 's|/etc/rc\.subr|${RC_SUBR}|; s|/usr/local|${PREFIX}|' \ - ${WRKSRC}/ifdepd.sh +USE_RC_SUBR= ${PORTNAME} post-install: @${CAT} ${PKGMESSAGE} Index: files/ifdepd.in =================================================================== RCS file: files/ifdepd.in diff -N files/ifdepd.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/ifdepd.in 17 Jul 2009 07:12:50 -0000 @@ -0,0 +1,45 @@ +#!/bin/sh +# + +# PROVIDE: ifdepd +# REQUIRE: netif routing +# KEYWORD: FreeBSD shutdown + +# +# Add the following lines to /etc/rc.conf to enable ifdepd: +# +#ifdepd_enable="YES" +#ifdepd_src_ifaces="em0:em1" +#ifdepd_dst_ifaces="carp1" + +. /etc/rc.subr + +name="ifdepd" +rcvar=`set_rcvar` +command="/usr/local/bin/ifdepd" +start_cmd="ifdepd_start" +stop_cmd="ifdepd_stop" + +ifdepd_enable=${ifdepd_enable:-"NO"} +load_rc_config $name + +ifdepd_start() +{ + echo 'Starting ifdepd.' + ifdepd_src_ifaces=`echo $ifdepd_src_ifaces | sed -E 's/[ \t]+/:/g'` + ifdepd_dst_ifaces=`echo $ifdepd_dst_ifaces | sed -E 's/[ \t]+/:/g'` + if checkyesno ${rcvar} && [ "x${ifdepd_src_ifaces}" != "x" ] && + [ "x${ifdepd_dst_ifaces}" != "x" ]; then + $command -d -S ${ifdepd_src_ifaces} -D ${ifdepd_dst_ifaces} + else + warn '$ifdepd_ifaces is not set.' + fi +} + +ifdepd_stop() +{ + echo 'Stopping ifdepd.' + killall ifdepd +} + +run_rc_command "$1" --- ifdepd-20050420_1.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?200907170713.n6H7D2pD040935>