ports/108663: [PATCH] mail/spamd: resolv conflict with sa-spamd and add pfspamd_setup_flags
Alex Samorukov
samm at os2.kiev.ua
Thu Feb 1 16:10:17 UTC 2007
>Number: 108663
>Category: ports
>Synopsis: [PATCH] mail/spamd: resolv conflict with sa-spamd and add pfspamd_setup_flags
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Feb 01 16:10:16 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Alex Samorukov
>Release: FreeBSD 5.4-RELEASE-p22 i386
>Organization:
Shevchenko Didkovskiy and Partners
>Environment:
System: FreeBSD deepvision.tsua.net 5.4-RELEASE-p22 FreeBSD 5.4-RELEASE-p22 #6: Thu Feb 1 14:16:07 EET
>Description:
SpamdD p5-Mail-SpamAssassin use PREFIX/bin/spamd to run in the daemon mode.
This port use PREFIX/libexec/spamd. This cause a problem, because check_process get wrong pid. And "start" will fail,
but "stop" command cab cause killing sa-spam. To avoid this i replaced check_process function with my own.
Also this patch add pfspamd_setup_flags. spamd-setup have -t key which allow to specify
ipfw table to use. We need to be able to pass table number to this tool, so i added this var.
Port maintainer (delphij at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
run sa-spamd.
run pfspamd.sh start. it will fail
>Fix:
--- spamd-3.7_2.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/mail/spamd/files/pfspamd.sh.in /root/tmp/ports/spamd/files/pfspamd.sh.in
--- /usr/ports/mail/spamd/files/pfspamd.sh.in Tue May 2 11:54:50 2006
+++ /root/tmp/ports/spamd/files/pfspamd.sh.in Thu Feb 1 16:39:08 2007
@@ -14,6 +14,8 @@
# Set it to "YES" to enable spamd
# pfspamd_flags (str): Set to "" by default.
# Extra flags passed to start command.
+# pfspamd_setup_flags (str): Set to "" by default.
+# Extra flags passed to spamd-setup command.
. %%RC_SUBR%%
@@ -26,13 +28,21 @@
[ -z "$pfspamd_enable" ] && pfspamd_enable="NO"
[ -z "$pfspamd_flags" ] && pfspamd_flags=""
+[ -z "$pfspamd_setup_flags" ] && pfspamd_setup_flags=""
load_rc_config $name
+# we override check_process to avoid conflict with the spamd from sa-spamd
+check_process()
+{
+ ps ax -o pid,command | grep "libexec/spamd" | grep -v grep | awk '{print $1}'
+}
+
+
pfspamd_postcmd()
{
if [ -x %%PREFIX%%/sbin/spamd-setup ]; then
- %%PREFIX%%/sbin/spamd-setup
+ %%PREFIX%%/sbin/spamd-setup $pfspamd_setup_flags
fi
}
--- spamd-3.7_2.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list