Date: Thu, 01 Feb 2007 18:03:50 +0200 From: Alex Samorukov <samm@os2.kiev.ua> To: FreeBSD-gnats-submit@FreeBSD.org Cc: samm@os2.kiev.ua, delphij@FreeBSD.org Subject: ports/108663: [PATCH] mail/spamd: resolv conflict with sa-spamd and add pfspamd_setup_flags Message-ID: <E1HCePe-00030S-Dm@deepvision.tsua.net> Resent-Message-ID: <200702011610.l11GAG7o003655@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1HCePe-00030S-Dm>