From b37967e573d371bb8b97831264d0c73ae6cc78cf Mon Sep 17 00:00:00 2001 From: markj Date: Fri, 18 Dec 2020 16:02:28 +0000 Subject: [PATCH] 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 --- libexec/rc/rc.d/ipfw | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/ipfw b/libexec/rc/rc.d/ipfw index 88c418481aa..ece0a93ba6f 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" -- 2.45.0