diff options
author | Mark Johnston <markj@FreeBSD.org> | 2020-12-18 16:02:28 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2020-12-18 16:02:28 +0000 |
commit | 5120612664fbc54d69ee1a21d0abcbab58712709 (patch) | |
tree | 070590aa021acbdbd51ade727d845985d68c2ac0 /libexec | |
parent | 50a6b28a31a03bed650d8eb05b48b8268bac8d95 (diff) | |
download | src-test2-5120612664fbc54d69ee1a21d0abcbab58712709.tar.gz src-test2-5120612664fbc54d69ee1a21d0abcbab58712709.zip |
Fix the ipfw service status output when ipfw.ko isn't loaded
Reported by: lme
Reviewed by: lme
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D27657
Notes
Notes:
svn path=/head/; revision=368762
Diffstat (limited to 'libexec')
-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 88c418481aac..ece0a93ba6f4 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" |