Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Mar 2016 14:37:59 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>, Kristof Provost <kp@FreeBSD.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r297315 - head/etc/rc.d
Message-ID:  <1459111079.1091.116.camel@freebsd.org>
In-Reply-To: <2324618D-B96F-494C-A1D7-3DDB694B6DDF@gmail.com>
References:  <201603271722.u2RHMRJw008751@repo.freebsd.org> <2324618D-B96F-494C-A1D7-3DDB694B6DDF@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2016-03-27 at 12:46 -0700, Ngie Cooper (yaneurabeya) wrote:
> > On Mar 27, 2016, at 10:22, Kristof Provost <kp@FreeBSD.org> 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




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