Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Feb 2002 05:31:00 -0800
From:      "Crist J. Clark" <cristjc@earthlink.net>
To:        Peter Wemm <peter@wemm.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, ps@mu.org
Subject:   Re: cvs commit: src/etc rc.network src/etc/defaults rc.conf src/share/man/man5 rc.conf.5
Message-ID:  <20020208053100.A8507@blossom.cjclark.org>
In-Reply-To: <20020208092030.A3E0C3BAD@overcee.wemm.org>; from peter@wemm.org on Fri, Feb 08, 2002 at 01:20:30AM -0800
References:  <200202042229.g14MTMX08809@freefall.freebsd.org> <20020208092030.A3E0C3BAD@overcee.wemm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 08, 2002 at 01:20:30AM -0800, Peter Wemm wrote:
> "Crist J. Clark" wrote:
> > cjc         2002/02/04 14:29:22 PST
> > 
> >   Modified files:        (Branch: RELENG_4)
> >     etc                  rc.network 
> >     etc/defaults         rc.conf 
> >     share/man/man5       rc.conf.5 
> >   Log:
> >   MFC: Make the rc.conf(5) 'log_in_vain' knob an integer.
> >   
> >   PR:             bin/32953
> 
> This is *very bad*.  It now overrides a previous setting in /etc/sysctl.conf
> and turns log_in_vain *off* if you'd already turned it on.
> 
> Please fix this ASAP.  You have removed the ability to set *only* tcp
> log_in_vain.  "NO" means "do not touch", not "set to zero" - that is what
> "0" is for.

This revives the whole ugly thread dealing with how friggin' ugly it
is to have sysctl's stuck out in the middle of rc.conf. Does "NO" mean
"not YES" or does it mean "NO?" Ugh. I wish someone had complained
when the change was made to -CURRENT, I hate messing with something
like this in -STABLE.

It seems like the best way to "fix" this is to simple nuke the whole
'log_in_vain' rc.conf knob. It was extraneous in the first place, and
it is only making more problems now.

Anyway, here is a quick fix for this issue, if 'log_in_vain' evaluates
to '0' or "NO," the sysctl(8) is not actually touched. One may tinker
with log_in_vain in /etc/sysctl.conf and set 'log_in_vain' to "NO" or
"0," and it will not be messed with.

But this should fix your complaint, Peter? Is this satisfacotry? I'll
MFC this immediately (tomorrow) if this patch provides the desired
behavior.

This is still suboptimal. The whole 'log_in_vain' rc.conf knob
should be terminated. Terminate? Terminate the rc.conf knob?
Terminate, with extreme predudice. (Don't fear the bikeshed.)

--- etc/rc.network      28 Jan 2002 11:06:02 -0000      1.122
+++ etc/rc.network      8 Feb 2002 13:25:33 -0000       1.123
@@ -24,7 +24,7 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 #
-# $FreeBSD: src/etc/rc.network,v 1.122 2002/01/28 11:06:02 sheldonh Exp $
+# $FreeBSD: src/etc/rc.network,v 1.123 2002/02/08 13:25:33 cjc Exp $
 #      From: @(#)netstart      5.9 (Berkeley) 3/30/91
 #
 
@@ -874,10 +874,11 @@
                ;;
        esac
 
-       [ "${log_in_vain}" -ne 0 ] && echo -n " log_in_vain=${log_in_vain}"
-       sysctl net.inet.tcp.log_in_vain="${log_in_vain}" >/dev/null
-       sysctl net.inet.udp.log_in_vain="${log_in_vain}" >/dev/null
-
+       [ "${log_in_vain}" -ne 0 ] && (
+           echo -n " log_in_vain=${log_in_vain}"
+           sysctl net.inet.tcp.log_in_vain="${log_in_vain}" >/dev/null
+           sysctl net.inet.udp.log_in_vain="${log_in_vain}" >/dev/null
+       )
        echo '.'
        network_pass4_done=YES
 }

This just shows how having rc.conf messing sysctl(8) knobs is begging
for problems. I will look at the whole issue some more.
-- 
Crist J. Clark                     |     cjclark@alum.mit.edu
                                   |     cjclark@jhu.edu
http://people.freebsd.org/~cjc/    |     cjc@freebsd.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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