NetBSD/etc/rc.d/pflogd

29 lines
422 B
Bash

#!/bin/sh
#
# $NetBSD: pflogd,v 1.3 2008/06/18 09:06:26 yamt Exp $
#
# PROVIDE: pflogd
# REQUIRE: pf
# BEFORE: SERVERS
$_rc_subr_loaded . /etc/rc.subr
name="pflogd"
rcvar=$name
command="/sbin/${name}"
start_precmd="pflogd_precmd"
pidfile="/var/run/${name}.pid"
pflogd_precmd()
{
if ! ifconfig pflog0 >/dev/null 2>&1; then
ifconfig pflog0 create
fi
ifconfig pflog0 up
}
load_rc_config $name
run_rc_command "$1"