pf_boot revision 1.1
1#!/bin/sh 2# 3# $NetBSD: pf_boot,v 1.1 2005/08/23 12:12:56 peter Exp $ 4# 5 6# PROVIDE: pf_boot 7# REQUIRE: root beforenetlkm mountcritlocal tty 8# BEFORE: network 9 10$_rc_subr_loaded . /etc/rc.subr 11 12name="pf_boot" 13rcvar="pf" 14start_cmd="pf_boot_start" 15stop_cmd=":" 16 17pf_boot_start() 18{ 19 if [ "$autoboot" != "yes" ]; then 20 err 1 "This script should only be executed at boot time." 21 fi 22 23 if [ -f /etc/pf.boot.conf ]; then 24 /sbin/pfctl -q -f /etc/pf.boot.conf 25 elif [ -f /etc/defaults/pf.boot.conf ]; then 26 /sbin/pfctl -q -f /etc/defaults/pf.boot.conf 27 else 28 warn "can't load initial pf rules; pf start aborted." 29 echo "ERROR: ABORTING BOOT (sending SIGTERM to parent)!" 30 kill -TERM $$ 31 exit 1 32 fi 33 34 /sbin/pfctl -q -e 35} 36 37load_rc_config $name 38run_rc_command "$1" 39