Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Dec 2010 20:01:34 -0800
From:      Craig Leres <leres@ee.lbl.gov>
To:        "Philip M. Gollucci" <pgollucci@p6m7g8.com>
Cc:        Doug Barton <dougb@FreeBSD.org>, cvs-all@FreeBSD.org, ports-committers@FreeBSD.org, cvs-ports@FreeBSD.org, "Philip M. Gollucci" <pgollucci@FreeBSD.org>, janos.mohacsi@bsd.hu
Subject:   Re: cvs commit: ports/net/beacon Makefile ports/net/beacon/files beacon.in patch-Makefile.in patch-common-beacon.patch patch-libbeacon-Makefile.in
Message-ID:  <4D0C321E.7050902@ee.lbl.gov>
In-Reply-To: <4D0C292C.5060008@p6m7g8.com>
References:  <201012152244.oBFMigGD066775@repoman.freebsd.org> <4D0BCEFA.1030305@FreeBSD.org> <4D0BD3C5.6010809@p6m7g8.com> <4D0C292C.5060008@p6m7g8.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------040805090603000203000309
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Philip M. Gollucci wrote:
> Can you please test this change paying special attention to dougb's
> additional comment below.
>
> http://people.freebsd.org/~pgollucci/beacon.in.txt

I tested it on my box and had to make a couple of tweaks before it
worked. Quotes were missing and buser and procname were not defined yet.
Also, beacon handles the pidfile on its own from the config file, not
the command line. Attached is a context diff to your version.

Doug Barton wrote:
>                                   Finally the traditional way of
> daemoninzing is to make command /usr/sbin/daemon, and command_args
> include the thing to start. There are numerous examples of this, it
> should not be too hard to find one.

I don't see any examples in the ports in the ports tree:

    fun 30 % pwd
    /usr/ports
    fun 31 % find . -maxdepth 3 -name Makefile | xargs egrep -w daemon |
grep command
    ./devel/fossology/Makefile:# - Add status command to rc.d script
(run through "daemon -p ...")
    ./net-p2p/btpd/Makefile:COMMENT=        Bittorrent client consisting
of a daemon and client commands

> FYI, if that doesn't work for some reason, this is how we achieved
> it in the rc.d script for devel/viewvc:
>
http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/viewvc/files/viewvc.in?rev=1.5

That seems to be doing it the same way the current committed version
of files/beacon.in does; viewvc_start() invokes daemon directly.

		Craig

--------------040805090603000203000309
Content-Type: text/plain;
 name="patch-beacon.in.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="patch-beacon.in.txt"

*** /tmp/beacon.in	Fri Dec 17 19:19:38 2010
--- beacon.in	Fri Dec 17 19:49:12 2010
***************
*** 29,41 ****
  
  load_rc_config $name
  
- command_args= -u ${buser} -f ${procname} -p ${pidfile}
  command_interpreter="%%PREFIX%%/bin/perl"
  config=${beacon_config:-%%PREFIX%%/etc/${name}.conf}
  buser=${beacon_user:-nobody}
  outputdir="${beacon_outputdir:-%%PREFIX%%/www/data-dist/beacon}"
  procname=${beacon_program:-%%PREFIX%%/bin/${name}}
  pidfile="${beacon_pidfile:-${outputdir}/multicastbeacon.PID}"
  
  beacon_prestart()
  {
--- 29,41 ----
  
  load_rc_config $name
  
  command_interpreter="%%PREFIX%%/bin/perl"
  config=${beacon_config:-%%PREFIX%%/etc/${name}.conf}
  buser=${beacon_user:-nobody}
  outputdir="${beacon_outputdir:-%%PREFIX%%/www/data-dist/beacon}"
  procname=${beacon_program:-%%PREFIX%%/bin/${name}}
  pidfile="${beacon_pidfile:-${outputdir}/multicastbeacon.PID}"
+ command_args="-u ${buser} -f ${procname}"
  
  beacon_prestart()
  {

--------------040805090603000203000309--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D0C321E.7050902>