From andrew@scoop.co.nz  Wed Jun 15 05:53:57 2005
Return-Path: <andrew@scoop.co.nz>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 4BA7C16A41C
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 15 Jun 2005 05:53:57 +0000 (GMT)
	(envelope-from andrew@scoop.co.nz)
Received: from a2.scoop.co.nz (aurora.scoop.co.nz [202.50.109.205])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C593243D49
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 15 Jun 2005 05:53:54 +0000 (GMT)
	(envelope-from andrew@scoop.co.nz)
Received: from a2.scoop.co.nz (localhost [127.0.0.1])
	by a2.scoop.co.nz (8.13.3/8.12.11) with ESMTP id j5F5rqBs043379
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 15 Jun 2005 17:53:52 +1200 (NZST)
	(envelope-from andrew@a2.scoop.co.nz)
Received: (from andrew@localhost)
	by a2.scoop.co.nz (8.13.3/8.12.11/Submit) id j5F5rqVS043378;
	Wed, 15 Jun 2005 17:53:52 +1200 (NZST)
	(envelope-from andrew)
Message-Id: <200506150553.j5F5rqVS043378@a2.scoop.co.nz>
Date: Wed, 15 Jun 2005 17:53:52 +1200 (NZST)
From: Andrew McNaughton <andrew@scoop.co.nz>
Reply-To: Andrew McNaughton <andrew@scoop.co.nz>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: patch to rc.d script for milter-greylist - currently ignores rc.conf variables
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         82259
>Category:       ports
>Synopsis:       patch to rc.d script for mail/milter-greylist - currently ignores rc.conf variables
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    flz
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 15 06:00:30 GMT 2005
>Closed-Date:    Thu Jun 30 12:14:31 GMT 2005
>Last-Modified:  Thu Jun 30 12:14:31 GMT 2005
>Originator:     Andrew McNaughton <andrew@scoop.co.nz>
>Release:        FreeBSD 4.11-RELEASE-p9 i386
>Organization:
Scoop Media Ltd
>Environment:
System: FreeBSD a2.scoop.co.nz 4.11-RELEASE-p9 FreeBSD 4.11-RELEASE-p9 #1: Mon May 16 14:40:36 NZST 2005 andrew@a2.scoop.co.nz:/usr/obj/usr/src-4.10/sys/wal i386


	
>Description:

variables set in the rc.conf file for milter-greylist don't take effect, as the steps in the rc.d script are performed in the wrong order.

>How-To-Repeat:

Try setting the location of the socket file, pidfile or some such thing in rc.conf.  Nothing happens

>Fix:

The following fix appears to work, but I'm copying other rc.d scripts fairly blindly, without much familiarity with what I'm doing.  

Someone should check this patch before applying it.

--- milter-greylist.sh.orig     Wed Jun 15 17:36:41 2005
+++ milter-greylist.sh  Wed Jun 15 17:43:04 2005
@@ -13,6 +13,14 @@
 #
 # DO NOT CHANGE THESE DEFAULT VALUES HERE
 #
+
+. /usr/local/etc/rc.subr
+
+name="miltergreylist"
+rcvar=`set_rcvar`
+
+load_rc_config $name
+
 miltergreylist_enable=${miltergreylist_enable-"NO"}
 miltergreylist_runas=${miltergreylist_runas-"smmsp"}
 miltergreylist_pidfile=${miltergreylist_pidfile-"/var/run/milter-greylist.pid"}
@@ -21,12 +29,8 @@
 miltergreylist_flags=${miltergreylist_flags-"-P $miltergreylist_pidfile \
 -f $miltergreylist_cfgfile -p $miltergreylist_sockfile -u $miltergreylist_runas"}
 
-. /usr/local/etc/rc.subr
 
-name="miltergreylist"
-rcvar=`set_rcvar`
 command="/usr/local/bin/milter-greylist"
 
-load_rc_config $name
 
 run_rc_command "$1"


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: flz 
State-Changed-When: Tue Jun 28 08:01:49 GMT 2005 
State-Changed-Why:  
Forward PR to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=82259 
Responsible-Changed-From-To: freebsd-ports-bugs->flz 
Responsible-Changed-By: flz 
Responsible-Changed-When: Tue Jun 28 08:02:13 GMT 2005 
Responsible-Changed-Why:  
Grab. 

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

From: Florent Thoumie <flz@FreeBSD.org>
To: aragorn+ports@teaser.fr
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/82259: patch to rc.d script for mail/milter-greylist -
 currently ignores rc.conf variables
Date: Tue, 28 Jun 2005 10:04:57 +0200

 Florent Thoumie wrote:
 > Synopsis: patch to rc.d script for mail/milter-greylist - currently ignores rc.conf variables
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: flz
 > State-Changed-When: Tue Jun 28 08:01:49 GMT 2005
 > State-Changed-Why: 
 > Forward PR to maintainer.
 > 
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=82259
 
 	Dear maintainer, please have a loot at this PR.

From: Cyril Guibourg <aragorn+ports@teaser.fr>
To: Florent Thoumie <flz@FreeBSD.org>
Cc: aragorn+ports@teaser.fr, freebsd-gnats-submit@FreeBSD.org,
        Andrew
 McNaughton <andrew@scoop.co.nz>
Subject: Re: ports/82259: patch to rc.d script for mail/milter-greylist -
 currently ignores rc.conf variables
Date: Wed, 29 Jun 2005 20:56:44 +0200

 Florent Thoumie <flz@FreeBSD.org> writes:
 
 > 	Dear maintainer, please have a loot at this PR.
 
 This is ok. Please commit.
 Thanks.
State-Changed-From-To: feedback->closed 
State-Changed-By: flz 
State-Changed-When: Thu Jun 30 12:14:14 GMT 2005 
State-Changed-Why:  
Committed, thanks! 

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