Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Dec 2020 16:02:29 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r368762 - head/libexec/rc/rc.d
Message-ID:  <202012181602.0BIG2T3Y042531@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Fri Dec 18 16:02:28 2020
New Revision: 368762
URL: https://svnweb.freebsd.org/changeset/base/368762

Log:
  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

Modified:
  head/libexec/rc/rc.d/ipfw

Modified: head/libexec/rc/rc.d/ipfw
==============================================================================
--- head/libexec/rc/rc.d/ipfw	Fri Dec 18 15:07:14 2020	(r368761)
+++ head/libexec/rc/rc.d/ipfw	Fri Dec 18 16:02:28 2020	(r368762)
@@ -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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202012181602.0BIG2T3Y042531>