diff options
author | Mark Johnston <markj@FreeBSD.org> | 2020-12-18 16:02:28 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2020-12-26 21:29:32 +0000 |
commit | 32b85fbcf1f02041dbf827eda570447a3ac42597 (patch) | |
tree | ded01f7cc7c5e8352dba3d7b5b85f5da09688259 | |
parent | 7f0550463a4098fac37d6abb37a124005cbed09f (diff) | |
download | src-32b85fbcf1f02041dbf827eda570447a3ac42597.tar.gz src-32b85fbcf1f02041dbf827eda570447a3ac42597.zip |
Fix the ipfw service status output when ipfw.ko isn't loaded
(cherry picked from commit 5120612664fbc54d69ee1a21d0abcbab58712709)
-rwxr-xr-x | libexec/rc/rc.d/ipfw | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libexec/rc/rc.d/ipfw b/libexec/rc/rc.d/ipfw index df14b7eaa0d4..ced473a5aac4 100755 --- a/libexec/rc/rc.d/ipfw +++ b/libexec/rc/rc.d/ipfw @@ -129,7 +129,9 @@ ipfw_status() status=$(sysctl -i -n net.inet.ip.fw.enable) : ${status:=0} if afexists inet6; then - status=$((${status} + $(sysctl -i -n net.inet6.ip6.fw.enable))) + status6=$(sysctl -i -n net.inet6.ip6.fw.enable) + : ${status6:=0} + status=$((${status} + ${status6})) fi if [ ${status} -eq 0 ]; then echo "ipfw is not enabled" |