From owner-svn-src-all@freebsd.org Thu Jun 7 13:16:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEE8AFE745F; Thu, 7 Jun 2018 13:16:54 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6496A68113; Thu, 7 Jun 2018 13:16:54 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4518320999; Thu, 7 Jun 2018 13:16:54 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w57DGs40026064; Thu, 7 Jun 2018 13:16:54 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w57DGsQa026063; Thu, 7 Jun 2018 13:16:54 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201806071316.w57DGsQa026063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Thu, 7 Jun 2018 13:16:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334782 - head/etc/rc.d X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/etc/rc.d X-SVN-Commit-Revision: 334782 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2018 13:16:54 -0000 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