freebsd-skq/sbin/pfctl
Kristof Provost fa1d4439f9 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>
MFC after:	1 week
2018-06-06 19:36:37 +00:00
..
tests DIRDEPS_BUILD: Connect new directories. 2017-10-31 00:04:07 +00:00
Makefile Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
parse.y various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
pf_print_state.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
pfctl_altq.c pfctl: Make most global variables static. 2016-08-04 19:24:44 +00:00
pfctl_optimize.c pfctl(8): Fix two wrong conditions. 2018-01-27 22:57:01 +00:00
pfctl_osfp.c pfctl: Make most global variables static. 2016-08-04 19:24:44 +00:00
pfctl_parser.c pf: Return non-zero from 'status' if pf is not enabled 2018-06-06 19:36:37 +00:00
pfctl_parser.h pf: Return non-zero from 'status' if pf is not enabled 2018-06-06 19:36:37 +00:00
pfctl_qstats.c Add ALTQ(9) support for the CoDel algorithm. 2015-08-21 22:02:22 +00:00
pfctl_radix.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
pfctl_table.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
pfctl.8 pf: Return non-zero from 'status' if pf is not enabled 2018-06-06 19:36:37 +00:00
pfctl.c pf: Return non-zero from 'status' if pf is not enabled 2018-06-06 19:36:37 +00:00
pfctl.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00