]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r334726:
authorkp <kp@FreeBSD.org>
Wed, 13 Jun 2018 13:15:04 +0000 (13:15 +0000)
committerkp <kp@FreeBSD.org>
Wed, 13 Jun 2018 13:15:04 +0000 (13:15 +0000)
commited19a27d62180e3b8548339e8c28c946fedb4a81
tree5b7096c63f0e298864cd530b54acfda47fc8227c
parent5c5af9c85edda9026bce7074893476d76e26a990
MFC r334726:

pf: Return non-zero from 'status' if pf is not enabled

In the pf rc.d script the output of `/etc/rc.d/pf status` or `/etc/rc.d/pf
onestatus` always provided an exit status of zero. This made it fiddly to
programmatically determine if pf was running or not.

Return a non-zero status if the pf module is not loaded, extend pfctl to have
an option to return an error status if pf is not enabled.

PR: 228632
Submitted by: James Park-Watt <jimmypw AT gmail.com>
etc/rc.d/pf
sbin/pfctl/pfctl.8
sbin/pfctl/pfctl.c
sbin/pfctl/pfctl_parser.c
sbin/pfctl/pfctl_parser.h