#!/bin/sh # # $NetBSD: npf,v 1.7.6.1 2023/10/13 18:04:49 martin Exp $ # # Public Domain. # # PROVIDE: npf # REQUIRE: root bootconf CRITLOCALMOUNTED tty network # BEFORE: NETWORKING $_rc_subr_loaded . /etc/rc.subr name="npf" rcvar=$name start_cmd="npf_start" stop_cmd="npf_stop" reload_cmd="npf_reload" status_cmd="npf_status" extra_commands="reload status" npf_start() { echo "Enabling NPF $npf_rules" /sbin/npfctl reload "$npf_rules" # The npf_boot script has enabled npf already. if [ "$autoboot" != "yes" ]; then /sbin/npfctl start fi } npf_stop() { echo "Disabling NPF." /sbin/npfctl stop /sbin/npfctl flush } npf_reload() { echo "Reloading NPF ruleset $npf_rules" /sbin/npfctl reload "$npf_rules" } npf_status() { : } load_rc_config $name run_rc_command "$1"