From 78c3e934506322c92ae899923421a1be4e187e33a07ae05304d0f5ce11d0a4fd Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Thu, 3 Sep 2026 14:20:52 -0400 Subject: [PATCH] Anchor for rules must exist before updating. --- rc.d/allow_hosts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rc.d/allow_hosts b/rc.d/allow_hosts index 971f689..cf243cf 100755 --- a/rc.d/allow_hosts +++ b/rc.d/allow_hosts @@ -29,7 +29,10 @@ allow_hosts_start() { echo "Running allow hosts" echo "include \"${allow_hosts_rules}\"" > ${rc_router_gen_dir}/pf.rules.conf - pfctl -a allow-hosts -f ${allow_hosts_rules} + if [ -n "$( pfctl -s Anchor | grep '\' )" ] + then + pfctl -a allow-hosts -f ${allow_hosts_rules} + fi } allow_hosts_stop()