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>
This commit is contained in:
parent
7ff965d828
commit
81a16edc2f
@ -66,7 +66,11 @@ pf_resync()
|
||||
|
||||
pf_status()
|
||||
{
|
||||
$pf_program -s info
|
||||
if ! [ -c /dev/pf ] ; then
|
||||
echo "pf.ko is not loaded"
|
||||
else
|
||||
$pf_program -s info
|
||||
fi
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
||||
|
Loading…
Reference in New Issue
Block a user