cvs commit: ports/net/beacon Makefile ports/net/beacon/files
beacon.in patch-Makefile.in patch-common-beacon.patch
patch-libbeacon-Makefile.in
Craig Leres
leres at ee.lbl.gov
Sat Dec 18 04:01:43 UTC 2010
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
-------------- next part --------------
*** /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()
{
More information about the cvs-ports
mailing list