Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Feb 2002 18:36:42 +0100
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        Paul Fardy <pdfardy@mac.com>
Cc:        current@freebsd.org, stable@freebsd.org
Subject:   Re: *_enable="YES" behavior is bogus
Message-ID:  <20020201173641.GA48397@student.uu.se>
In-Reply-To: <5F46C986-16DB-11D6-8CEC-00039359034A@mac.com>
References:  <15448.64681.401219.163184@guru.mired.org> <5F46C986-16DB-11D6-8CEC-00039359034A@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 01, 2002 at 02:47:30AM -0330, Paul Fardy wrote:

> These examples, _and_yours_, are examples that suggest that
> /etc/rc.conf has a fundamental principle that
> 
> 	foo_enable="YES/NO"
> 
> is supreme. One can set up all the requisite parameters (e.g. you
> can create sendmail.cf, named.conf, tune inetd.conf, compile psm
> into the kernel or install any of various screen savers), yet one
> can still set an appropriate variable
> 
> 	foo_enable="NO"
> 
> which will not enable the feature.

It will not enable it, no. Nor will the feature be disabled if it for
some reason already was enabled.


> 
> >Not enabling something is *not* the same thing as disabling it.
> 
> But I think that the intent in /etc/rc.conf is that enable="NO"
> _is_ the same thing as disabling it. You might say "If that were


Consider that the actual code in the various rc* start scripts is
in most cases of the form:

if foo_enable==yes
  do stuff
else
  do nothing


Some cases are instead

if foo_enable==no
  do nothing
else
  do stuff



A cursory search found a total of one instance where foobar="NO" actually
makes something happen, and it was not of the form foo_enable="NO"

(The single exception I found is
tcp_extensions="NO")


For all other variables one can set in rc.conf foobar="NO" means
"do nothing".


Looking at the code the intent certainly seems to be foo_enable="NO"
shouldn't do anything.




> the intent, they'd have used _______." What word should we use
> to  indicate the absolute YES or NO that some of us believe
> should be the simple correct interpretation?

foo_enabled="YES/NO"  perhaps??

I.e. describing the desired state of the feature instead of the desired
action to be taken.


There are of course several people who feel that the current behaviour
is the intuitive and obviously correct interpretation and would prefer
not to have it changed.


-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se

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




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