svn commit: r359701 - stable/11/etc/rc.d
Eugene Grosbein
eugen at FreeBSD.org
Tue Apr 7 16:57:24 UTC 2020
Author: eugen
Date: Tue Apr 7 16:57:23 2020
New Revision: 359701
URL: https://svnweb.freebsd.org/changeset/base/359701
Log:
MFC r356943,356944: Correct "service ipfw status" for INET6-only systems.
Modified:
stable/11/etc/rc.d/ipfw
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/etc/rc.d/ipfw
==============================================================================
--- stable/11/etc/rc.d/ipfw Tue Apr 7 16:56:34 2020 (r359700)
+++ stable/11/etc/rc.d/ipfw Tue Apr 7 16:57:23 2020 (r359701)
@@ -127,7 +127,11 @@ ipfw_stop()
ipfw_status()
{
status=$(sysctl -n net.inet.ip.fw.enable)
- if [ ${status} -eq 0 ]; then
+ : ${status:=0}
+ if afexists inet6; then
+ status=$((${status} + $(sysctl -i -n net.inet6.ip6.fw.enable)))
+ fi
+ if [ ${status} -eq 0 ]; then
echo "ipfw is not enabled"
exit 1
else
More information about the svn-src-stable-11
mailing list