summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorRobert Nagy <robert@cvs.openbsd.org>2011-08-08 17:13:32 +0000
committerRobert Nagy <robert@cvs.openbsd.org>2011-08-08 17:13:32 +0000
commit8ad78c6cb93cdb8d14aa64578906c224295626ee (patch)
tree30598dc262020410a9ef8f0b16588bd81c2d981f /etc
parent87b19f0fb6f5ca691e30f241a1d2dd0760605fcf (diff)
create pflog0 if pf is enabled just like we do in the pflogd script
from sthen@
Diffstat (limited to 'etc')
-rw-r--r--etc/rc.d/spamlogd12
1 files changed, 11 insertions, 1 deletions
diff --git a/etc/rc.d/spamlogd b/etc/rc.d/spamlogd
index b8620e01a8c..8747a7f1b7b 100644
--- a/etc/rc.d/spamlogd
+++ b/etc/rc.d/spamlogd
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $OpenBSD: spamlogd,v 1.1 2011/07/08 02:15:34 robert Exp $
+# $OpenBSD: spamlogd,v 1.2 2011/08/08 17:13:31 robert Exp $
daemon="/usr/libexec/spamlogd"
@@ -10,6 +10,16 @@ rc_reload=NO
rc_pre() {
[ X"${spamd_flags}" != X"NO" -a X"${spamd_black}" = X"NO" ]
+ if pfctl -si | grep -q Enabled; then
+ ifconfig pflog0 create
+ if ifconfig pflog0; then
+ ifconfig pflog0 up
+ else
+ return 1
+ fi
+ else
+ return 1
+ fi
}
rc_cmd $1