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

     - 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

Yeah, I like a command flag better too.

Robin

I really, really, *really* think this should be a command line option!

Yeah, I like a command flag better too.

Ditto

Good to hear that you think so too. :slight_smile: That's the plan but while I was doing the script-level development I just made it an environment variable. I did forget to mention that in the message.

  .Seth