From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jul 24 15:03:25 2009 Return-Path: Delivered-To: freebsd-ports-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C33B6106564A; Fri, 24 Jul 2009 15:03:25 +0000 (UTC) (envelope-from tony@lava.net) Received: from outgoing02.lava.net (pie.lava.net [IPv6:2001:1888:0:1:230:48ff:fe5b:3b8c]) by mx1.freebsd.org (Postfix) with ESMTP id 796C28FC30; Fri, 24 Jul 2009 15:03:25 +0000 (UTC) (envelope-from tony@lava.net) Received: from [2001:1888::a:214:51ff:fe29:1e4e] (unknown [IPv6:2001:1888:0:a:214:51ff:fe29:1e4e]) by outgoing02.lava.net (Postfix) with ESMTPS id EE7A9171883; Fri, 24 Jul 2009 05:03:24 -1000 (HST) Date: Fri, 24 Jul 2009 05:03:24 -1000 (HST) From: Antonio Querubin To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org In-Reply-To: <200907191450.n6JEo3GO019519@freefall.freebsd.org> Message-ID: References: <200907191450.n6JEo3GO019519@freefall.freebsd.org> User-Agent: Alpine 1.00 (OSX 882 2007-12-20) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: ports/136903: port net/beacon does not start X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jul 2009 15:03:26 -0000 The diff below is the necessary patch to Makefile and incorporates a startup script mentioned in an earlier followup. beacon.in should be placed in the files directory. Tony tony@lava.net diff -ruN /usr/ports/net/beacon/Makefile ./Makefile --- /usr/ports/net/beacon/Makefile 2008-08-20 20:17:48.000000000 -1000 +++ ./Makefile 2009-07-24 04:53:06.000000000 -1000 @@ -32,17 +32,14 @@ CONFIGURE_ARGS+= --enable-ipv6 .endif +USE_RC_SUBR= beacon + .include .if ${ARCH} != "i386" BROKEN= Does not compile on !i386 .endif -pre-build: - cd ${WRKSRC}/Net-Multicast-Beacon && \ - make Makefile.perl && \ - ${REINPLACE_CMD} -E 's,doc_\$$\(INSTALLDIRS\)_install$$,,g' Makefile.perl - post-install: @${ECHO} "Sample config installed at \ ${PREFIX}/etc/beacon.conf.sample" diff -ruN /usr/ports/net/beacon/files/beacon.in ./files/beacon.in --- /usr/ports/net/beacon/files/beacon.in 1969-12-31 14:00:00.000000000 -1000 +++ ./files/beacon.in 2009-07-24 04:46:17.000000000 -1000 @@ -0,0 +1,30 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: beacon +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to enable beacon. +# +# beacon_enable="YES" + +beacon_enable=${beacon_enable-"NO"} + +. %%RC_SUBR%% + +name="beacon" +rcvar=`set_rcvar` + +command="%%PREFIX%%/bin/${name}" + +conffile=%%PREFIX%%/etc/beacon.conf +if [ -f $conffile ]; then + piddir=`grep OUTPUTDIR $conffile | awk '{print $3}'` +fi +pidfile=${piddir}/multicastbeacon.PID + +load_rc_config $name + +run_rc_command "$1"