summaryrefslogtreecommitdiff
path: root/etc/rc.d/pflogd
blob: 963616775ae7178bb7641c3155d5a9c7b9797d77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/ksh
#
# $OpenBSD: pflogd,v 1.3 2018/01/11 19:52:12 rpe Exp $

daemon="/sbin/pflogd"

. /etc/rc.d/rc.subr

pexp="pflogd: \[priv\]"

rc_pre() {
	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