Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Jan 2020 17:16:02 +0000 (UTC)
From:      Eugene Grosbein <eugen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r356944 - head/libexec/rc/rc.d
Message-ID:  <202001211716.00LHG2fJ056496@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eugen
Date: Tue Jan 21 17:16:02 2020
New Revision: 356944
URL: https://svnweb.freebsd.org/changeset/base/356944

Log:
  libexec/rc/rc.d/ipfw: style fix after r356943
  
  Also, make sure it does not break for systems without ipfw code loaded.
  
  MFC after:	1 months
  X-MFC-with:	356943

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

Modified: head/libexec/rc/rc.d/ipfw
==============================================================================
--- head/libexec/rc/rc.d/ipfw	Tue Jan 21 17:02:57 2020	(r356943)
+++ head/libexec/rc/rc.d/ipfw	Tue Jan 21 17:16:02 2020	(r356944)
@@ -127,10 +127,11 @@ ipfw_stop()
 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) ))
+		status=$((${status} + $(sysctl -i -n net.inet6.ip6.fw.enable)))
 	fi
-	if [ ${status:-0} -eq 0 ]; then
+	if [ ${status} -eq 0 ]; then
 		echo "ipfw is not enabled"
 		exit 1
 	else



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