[Bro-Dev] Command line VS. environmnet variable (was: Re: [Bro-Commits] [git/bro] master: Hopefully the last major script reorganization. (597a4d6))

Gregor Maier gregor at icir.org
Sat Aug 6 21:58:51 PDT 2011


>      - All of scripts/base/ is loaded by main.cc
>      	- Can be disabled by setting $BRO_NO_BASE_SCRIPTS
>      	- Scripts in scripts/base/ don't use relative path loading to ease use of BRO_NO_BASE_SCRIPTS (to copy and paste that script).

I really, really, *really* think this should be a command line option! 
After all, that's what command line options are there for: to 
enable/disable/modify features of the executed process.
Environment variables are a pain when used to set options. They are 
nice/good to set paths, etc.

It's easy to think an env. variable is set (or not set) when in fact 
it's the other way round. Similarly, it's hard if a user has an issue: 
It's now not enough to ask for a the command line, one also needs the 
environment.

If one really wants to set this up through the environment, one can use 
a wrapper script or an alias.

For the same reason I also think that FAKE_DNS should be a command line 
option (in particular because two other DNS modes are settable via the 
command line). Maybe make a single DNS command line option that takes a 
parameter. We can still honor the environment variable or issue a 
warning/error so that user's aren't surprised.

cu
Gregor
-- 
Gregor Maier
<gregor at icir.org>  <gregor at icsi.berkeley.edu>
Int. Computer Science Institute (ICSI)
1947 Center St., Ste. 600
Berkeley, CA 94704, USA
http://www.icir.org/gregor/


More information about the bro-dev mailing list