From owner-svn-src-head@freebsd.org Sun Mar 27 20:38:07 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1873ADF51C for ; Sun, 27 Mar 2016 20:38:07 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from erouter6.ore.mailhop.org (erouter6.ore.mailhop.org [54.187.213.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 788231C58 for ; Sun, 27 Mar 2016 20:38:07 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: bc4165ca-f45b-11e5-827e-7d17a39bef25 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.34.117.227 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.34.117.227]) by outbound3.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Sun, 27 Mar 2016 20:37:33 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.14.9) with ESMTP id u2RKbxkb025913; Sun, 27 Mar 2016 14:37:59 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1459111079.1091.116.camel@freebsd.org> Subject: Re: svn commit: r297315 - head/etc/rc.d From: Ian Lepore To: "Ngie Cooper (yaneurabeya)" , Kristof Provost Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 27 Mar 2016 14:37:59 -0600 In-Reply-To: <2324618D-B96F-494C-A1D7-3DDB694B6DDF@gmail.com> References: <201603271722.u2RHMRJw008751@repo.freebsd.org> <2324618D-B96F-494C-A1D7-3DDB694B6DDF@gmail.com> Content-Type: text/plain; charset="windows-1251" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2016 20:38:07 -0000 On Sun, 2016-03-27 at 12:46 -0700, Ngie Cooper (yaneurabeya) wrote: > > On Mar 27, 2016, at 10:22, Kristof Provost wrote: > > > > Author: kp > > Date: Sun Mar 27 17:22:27 2016 > > New Revision: 297315 > > URL: https://svnweb.freebsd.org/changeset/base/297315 > > … > > > Modified: head/etc/rc.d/pf > > =================================================================== > > =========== > > --- head/etc/rc.d/pf Sun Mar 27 16:27:49 2016 (r29731 > > 4) > > +++ head/etc/rc.d/pf Sun Mar 27 17:22:27 2016 (r29731 > > 5) > > @@ -66,7 +66,11 @@ pf_resync() > > > > pf_status() > > { > > - $pf_program -s info > > + if ! [ -c /dev/pf ] ; then > > + echo "pf.ko is not loaded" > > + else > > + $pf_program -s info > > + fi > > This might be better: > > load_kld pf || return 1 > $pf_program -s info > Having a status command say "module is not loaded" makes more sense to me than having it load the module so that it could tell you that pf is not active (which must surely be the bottom-line status if the module wasn't loaded to begin with). -- Ian