35 lines
618 B
Bash
Executable File
35 lines
618 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $NetBSD: pf_boot,v 1.9 2021/11/30 11:00:29 sborrill Exp $
|
|
#
|
|
|
|
# PROVIDE: pf_boot
|
|
# REQUIRE: root bootconf CRITLOCALMOUNTED tty
|
|
# BEFORE: network
|
|
|
|
$_rc_subr_loaded . /etc/rc.subr
|
|
|
|
name="pf_boot"
|
|
rcvar="pf"
|
|
start_cmd="pf_boot_start"
|
|
stop_cmd=":"
|
|
|
|
pf_boot_start()
|
|
{
|
|
if [ -f /etc/pf.boot.conf ]; then
|
|
/sbin/pfctl -q -f /etc/pf.boot.conf
|
|
elif [ -f /etc/defaults/pf.boot.conf ]; then
|
|
/sbin/pfctl -q -f /etc/defaults/pf.boot.conf
|
|
else
|
|
warn "can't load initial pf rules; pf start aborted."
|
|
stop_boot
|
|
exit 1
|
|
fi
|
|
|
|
/sbin/pfctl -q -e
|
|
}
|
|
|
|
load_rc_config $name
|
|
load_rc_config_var pf pf
|
|
run_rc_command "$1"
|