From d54c70589894f96ea08ead9222d2c274bd2e11d0 Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Wed, 9 Mar 2011 19:25:41 -0800 Subject: [PATCH] Adding new environment variable BRO_SEED_FILE to set the seed file for the random number generator. This works like the corresponding command line option but is more convinient when writing tests as it can be set in btest.cfg. --- src/main.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.cc b/src/main.cc index 06456f9765..22f8ee6976 100644 --- a/src/main.cc +++ b/src/main.cc @@ -196,6 +196,7 @@ void usage() fprintf(stderr, " $BROPATH | file search path (%s)\n", bro_path()); fprintf(stderr, " $BRO_PREFIXES | prefix list (%s)\n", bro_prefixes()); fprintf(stderr, " $BRO_DNS_FAKE | disable DNS lookups (%s)\n", bro_dns_fake()); + fprintf(stderr, " $BRO_SEED_FILE | file to load seeds from (not set)\n"); exit(1); } @@ -350,7 +351,7 @@ int main(int argc, char** argv) char* bst_file = 0; char* id_name = 0; char* events_file = 0; - char* seed_load_file = 0; + char* seed_load_file = getenv("BRO_SEED_FILE"); char* seed_save_file = 0; int seed = 0; int dump_cfg = false;