aboutsummaryrefslogtreecommitdiffstats
path: root/mail/spamd
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2009-09-17 20:41:07 +0800
committerpav <pav@FreeBSD.org>2009-09-17 20:41:07 +0800
commit016bdfd40b5242ebf7c0db111c05c44470c60238 (patch)
treeedcfe1bd6b85d8789cf4eeafb5999b3a129ee06d /mail/spamd
parent8511e96a4d81dab00481f0762139ce06a86b79ec (diff)
downloadfreebsd-ports-gnome-016bdfd40b5242ebf7c0db111c05c44470c60238.tar.gz
freebsd-ports-gnome-016bdfd40b5242ebf7c0db111c05c44470c60238.tar.zst
freebsd-ports-gnome-016bdfd40b5242ebf7c0db111c05c44470c60238.zip
- Fix rc script for blacklist mode
PR: ports/137992 Submitted by: Denny Lin <dennylin93@cnmc32.hs.ntnu.edu.tw> Approved by: olli hauer <ohauer@gmx.de> (maintainer) Feature safe: yes
Diffstat (limited to 'mail/spamd')
-rw-r--r--mail/spamd/Makefile1
-rw-r--r--mail/spamd/files/obspamd.in12
2 files changed, 8 insertions, 5 deletions
diff --git a/mail/spamd/Makefile b/mail/spamd/Makefile
index 53c8dc096dae..06aa9dac9977 100644
--- a/mail/spamd/Makefile
+++ b/mail/spamd/Makefile
@@ -7,6 +7,7 @@
PORTNAME= spamd
PORTVERSION= 4.5.0
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= BERLIOS
MASTER_SITE_SUBDIR=freebsdspamd
diff --git a/mail/spamd/files/obspamd.in b/mail/spamd/files/obspamd.in
index df81cfb17c59..c6cad28309b7 100644
--- a/mail/spamd/files/obspamd.in
+++ b/mail/spamd/files/obspamd.in
@@ -35,10 +35,7 @@ pidfile="/var/run/spamd.pid"
obspamd_precmd()
{
_rc=0
- # we need the white-space in the grep expr. to limit a failure
- # in parsing the flags, for example if someone
- # defined the word 'IP-based' in the banner.
- echo "${obspamd_flags}" | grep " \-b" 2>&1 > /dev/null
+ echo "${obspamd_flags}" | egrep "(^\-b| \-b)" 2>&1 > /dev/null
if [ $? -eq 1 ]; then
/sbin/mount -p | grep 'fdescfs.*/dev/fd.*fdescfs.*rw' 2>&1 > /dev/null
_rc=${?}
@@ -58,7 +55,12 @@ obspamd_postcmd()
{
if [ -x %%PREFIX%%/sbin/spamd-setup ]; then
if [ -r %%PREFIX%%/etc/spamd/spamd.conf ]; then
- %%PREFIX%%/sbin/spamd-setup -D
+ echo "${obspamd_flags}" | egrep "(^\-b| \-b)" 2>&1 > /dev/null
+ if [ $? ]; then
+ %%PREFIX%%/sbin/spamd-setup -bD
+ else
+ %%PREFIX%%/sbin/spamd-setup -D
+ fi
fi
fi
}