Created attachment 164775 [details]
pf rc.d script changed
Patch attached changes the behavior of /etc/rc.d/pf in case /dev/pf does not exist, and generates a "pf is not running." message.
This only changes the 'status' command, right? What's the use case here?
Created attachment 168602 [details]
patch pf rc script
The use case is not having `service pf status` throw error lines like this one:
xmj@mx12:~/repos/src-svnssh$ pfctl -s info
pfctl: /dev/pf: No such file or directory
and actually display that pf isn't loaded.
A commit references this bug:
Date: Sun Mar 27 17:22:27 UTC 2016
New revision: 297315
pf: Friendly error message for status if pf.ko is not loaded
Check if pf.ko is loaded (i.e. /dev/pf exists) before trying to use it. This
means that '/etc/rc.d/pf status' will no longer return 'pfctl: /dev/pf: No such
file or directory' but 'pf.ko is not loaded'.
Submitted by: Johannes Jost Meixner <xmj@FreeBSD.org>