Date: Thu, 7 Jun 2018 13:16:54 +0000 (UTC) From: Kristof Provost <kp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334782 - head/etc/rc.d Message-ID: <201806071316.w57DGsQa026063@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kp Date: Thu Jun 7 13:16:53 2018 New Revision: 334782 URL: https://svnweb.freebsd.org/changeset/base/334782 Log: ipfw: fix status if ipfw.ko is not loaded If the ipfw module is not loaded the net.inet.ip.fw.enable OID does not exist, which leads the script to report errors and incorrectly report that ipfw is enabled. Modified: head/etc/rc.d/ipfw Modified: head/etc/rc.d/ipfw ============================================================================== --- head/etc/rc.d/ipfw Thu Jun 7 13:14:09 2018 (r334781) +++ head/etc/rc.d/ipfw Thu Jun 7 13:16:53 2018 (r334782) @@ -117,8 +117,8 @@ ipfw_stop() ipfw_status() { - status=$(sysctl -n net.inet.ip.fw.enable) - if [ ${status} -eq 0 ]; then + status=$(sysctl -i -n net.inet.ip.fw.enable) + if [ ${status:-0} -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?201806071316.w57DGsQa026063>