ports/82259: patch to rc.d script for milter-greylist - currently ignores rc.conf variables
Andrew McNaughton
andrew at scoop.co.nz
Wed Jun 15 06:00:38 UTC 2005
>Number: 82259
>Category: ports
>Synopsis: patch to rc.d script for milter-greylist - currently ignores rc.conf variables
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Jun 15 06:00:30 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Andrew McNaughton <andrew at 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 at 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:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list