| Summary: | etc/rc.d/pf: report "pf not running" if /dev/pf doesn't exist | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Johannes Jost Meixner <xmj> | ||||||
| Component: | misc | Assignee: | freebsd-rc (Nobody) <rc> | ||||||
| Status: | Closed FIXED | ||||||||
| Severity: | Affects Only Me | CC: | kp, pf | ||||||
| Priority: | --- | Keywords: | patch | ||||||
| Version: | CURRENT | ||||||||
| Hardware: | Any | ||||||||
| OS: | Any | ||||||||
| Attachments: |
|
||||||||
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: Author: kp Date: Sun Mar 27 17:22:27 UTC 2016 New revision: 297315 URL: https://svnweb.freebsd.org/changeset/base/297315 Log: 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'. PR: 205671 Submitted by: Johannes Jost Meixner <xmj@FreeBSD.org> Changes: head/etc/rc.d/pf |
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.