2005-08-23 16:12:56 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2008-11-12 15:35:50 +03:00
|
|
|
# $NetBSD: pf_boot,v 1.3 2008/11/12 12:35:52 ad Exp $
|
2005-08-23 16:12:56 +04:00
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: pf_boot
|
2008-11-12 15:35:50 +03:00
|
|
|
# REQUIRE: root mountcritlocal tty
|
2005-08-23 16:12:56 +04:00
|
|
|
# BEFORE: network
|
|
|
|
|
|
|
|
$_rc_subr_loaded . /etc/rc.subr
|
|
|
|
|
|
|
|
name="pf_boot"
|
|
|
|
rcvar="pf"
|
|
|
|
start_cmd="pf_boot_start"
|
|
|
|
stop_cmd=":"
|
|
|
|
|
|
|
|
pf_boot_start()
|
|
|
|
{
|
|
|
|
if [ "$autoboot" != "yes" ]; then
|
|
|
|
err 1 "This script should only be executed at boot time."
|
|
|
|
fi
|
|
|
|
|
|
|
|
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."
|
2007-04-06 18:20:08 +04:00
|
|
|
stop_boot
|
2005-08-23 16:12:56 +04:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
/sbin/pfctl -q -e
|
|
|
|
}
|
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|