From nobody@FreeBSD.org  Fri Dec 21 07:17:17 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4FF1116A417
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 21 Dec 2007 07:17:17 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 448A713C4E1
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 21 Dec 2007 07:17:17 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id lBL7Gqxj095506
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 21 Dec 2007 07:16:52 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id lBL7GquF095505;
	Fri, 21 Dec 2007 07:16:52 GMT
	(envelope-from nobody)
Message-Id: <200712210716.lBL7GquF095505@www.freebsd.org>
Date: Fri, 21 Dec 2007 07:16:52 GMT
From: John Fox Maule <john@fox-maule.dk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Wrong pidfile in /usr/local/etc/rc.d/dcc-start port mail/dcc-dccd
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         118923
>Category:       ports
>Synopsis:       Wrong pidfile in /usr/local/etc/rc.d/dcc-start port mail/dcc-dccd
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 21 07:20:01 UTC 2007
>Closed-Date:    Fri Mar 14 16:14:59 UTC 2008
>Last-Modified:  Fri Mar 14 16:14:59 UTC 2008
>Originator:     John Fox Maule
>Release:        6.2
>Organization:
>Environment:
FreeBSD post.brmit.com 6.2-RELEASE FreeBSD 6.2-RELEASE #1: Wed Jan 24 01:22:42 CET 2007
>Description:
/usr/local/etc/rc.d/dcc-start (installed via ports) states that pidfile is 

pidfile=${dccifd_pidfile:-"/var/run/dcc/dccifd.pid"}

But it should be
pidfile=${dccifd_pidfile:-"/var/run/dccifd.pid"}

Also the ports seems very old 1.3.50 latest version 1.3.79 including fixes post version 1.3.50 that are specific to FreeBSD

See http://www.rhyolite.com/anti-spam/dcc/dcc-tree/CHANGES


>How-To-Repeat:
cd /usr/ports/mail/dcc/dcc-dcdd
make install clean
enable dcc by entering DCCIFD_ENABLE=on in /usr/local/dcc/dcc_conf
/usr/local/etc/rc.d/dcc-start start
/usr/local/etc/rc.d/dcc-start stop
>Fix:
Correct the pidfile in the startup script

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-ports-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Dec 21 07:23:44 UTC 2007 
Responsible-Changed-Why:  
Make this a ports PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118923 

From: Craig Green <cgreen@sentex.net>
To: bug-followup@FreeBSD.org, john@fox-maule.dk
Cc:  
Subject: Re: ports/118923: Wrong pidfile in /usr/local/etc/rc.d/dcc-start
 port mail/dcc-dccd
Date: Sat, 01 Mar 2008 14:48:00 -0500

 > /usr/local/etc/rc.d/dcc-start (installed via ports) states that pidfile is
 >
 > pidfile=${dccifd_pidfile:-"/var/run/dcc/dccifd.pid"}
 >
 > But it should be
 > pidfile=${dccifd_pidfile:-"/var/run/dccifd.pid"}
 
 
 Per the latest port (1.3.50_1), the run dir is /var/run/dcc.  The dccifd 
 pidfile is created in the run dir.  Stopping dccifd with the rc.d script 
 correctly finds the pidfile and stops the process.
 
 I suspect that you have an old copy of dcc_conf and need to update the 
 rundir specified therein to point to /var/run/dcc, so dccifd and the 
 others put their pidfiles in the right location (and incidentally don't 
 chown /var/run to dcc, which is why the rundir was changed to 
 /var/run/dcc in the first place).  Look for DCC_RUNDIR near the top of 
 dcc_conf.
 
 
 Regards,
 
 Craig.
 ------
 
 
 cgreen:Hpoint:/usr/ports/mail/dcc-dccd# grep rundir Makefile
 CONFIGURE_ARGS= --homedir=${PREFIX}/dcc --bindir=${PREFIX}/bin 
 --mandir=${MANPREFIX}/man --with-rundir=/var/run/dcc
 
 cgreen:Hpoint:/usr/ports/mail/dcc-dccd# make install
 [munch]
 
 cgreen:Hpoint:/usr/ports/mail/dcc-dccd# echo 'dccifd_enable="YES"' >> 
 /etc/rc.conf
 
 cgreen:Hpoint:/usr/ports/mail/dcc-dccd# cd /usr/local/dcc
 
 cgreen:Hpoint:/usr/local/dcc# ls -la
 total 40
 drwxr-xr-x  2 root  wheel   512 Mar  1 14:27 cgi-bin
 -rw-r--r--  1 root  wheel  4438 Mar  1 14:27 dcc_conf.dist
 -rw-r--r--  1 root  wheel   796 Mar  1 14:27 flod.dist
 -rw-r--r--  1 root  wheel   561 Mar  1 14:27 grey_flod.dist
 -rw-r--r--  1 root  wheel   496 Mar  1 14:27 grey_whitelist.dist
 -rw-------  1 dcc   wheel  2551 Mar  1 14:27 ids.dist
 drwxr-xr-x  2 root  wheel  1024 Mar  1 14:27 libexec
 drwx--x---  2 dcc   wheel   512 Mar  1 14:27 log
 -rw-------  1 dcc   wheel  7564 Mar  1 14:27 map
 -rw-------  1 dcc   wheel  1108 Mar  1 14:27 map.txt.dist
 -rw-r--r--  1 root  wheel  3842 Mar  1 14:27 whiteclnt.dist
 -rw-r--r--  1 root  wheel  1662 Mar  1 14:27 whitecommon.dist
 -rw-r--r--  1 root  wheel   674 Mar  1 14:27 whitelist.dist
 
 cgreen:Hpoint:/usr/local/dcc# cp dcc_conf.dist dcc_conf
 
 cgreen:Hpoint:/usr/local/dcc# grep -i rundir dcc_conf
 DCC_RUNDIR=/var/run/dcc
 Configure_DCC_RUNDIR=/var/run/dcc
 
 cgreen:Hpoint:/usr/local/dcc# vi dcc_conf
 [edit dcc_conf to change 'DCCIFD_ENABLE=off' to 'DCCIFD_ENABLE=on']
 
 cgreen:Hpoint:/usr/ports/mail/dcc-dccd# ls -la /var/run/dcc
 total 4
 drwxr-xr-x  2 dcc   wheel  512 Mar  1 14:24 .
 drwxr-xr-x  9 root  wheel  512 Mar  1 13:21 ..
 
 cgreen:Hpoint:/usr/local/dcc# /usr/local/etc/rc.d/dcc-start start
 Starting dccifd.
 
 cgreen:Hpoint:/usr/local/dcc# ls -la /var/run/dcc
 total 6
 drwxr-xr-x  2 dcc   wheel  512 Mar  1 14:29 .
 drwxr-xr-x  9 root  wheel  512 Mar  1 13:21 ..
 -rw-r--r--  1 dcc   wheel    6 Mar  1 14:29 dccifd.pid
 
 cgreen:Hpoint:/usr/local/dcc# ps ax | grep dcc
 87775  ??  Is     0:00.00 /usr/local/dcc/libexec/dccifd -Idcc -tCMN,5, 
 -llog -wwhiteclnt -Uuserdirs -SHELO -Smail_host -SSender -SList-ID
 87776  ??  I      0:00.01 /usr/local/dcc/libexec/dccifd -Idcc -tCMN,5, 
 -llog -wwhiteclnt -Uuserdirs -SHELO -Smail_host -SSender -SList-ID
 
 cgreen:Hpoint:/usr/local/dcc# /usr/local/etc/rc.d/dcc-start stop
 Stopping dccifd.
 Waiting for PIDS: 87776.
 
 cgreen:Hpoint:/usr/local/dcc# ps ax | grep dcc
 cgreen:Hpoint:/usr/local/dcc#
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Fri Mar 14 16:13:46 UTC 2008 
State-Changed-Why:  
Has been fixed in 1.3.50_1 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118923 
>Unformatted:
