[Bro] redef script variable from bro command line
Frank Meier
franky.meier.1 at gmx.de
Tue Mar 22 08:57:52 PDT 2016
Hi!
This is just a minor problem, but I would still like to understand, why
it does not work. I am trying to set the log rotation from the command
line. It works when I use the -e flag:
# bro -r 2009-m57.00.pcap -e "redef Log::default_rotation_interval = 20min"
It does not work, if I set the variable at the command prompt:
# bro test.bro -r 2009-m57.00.pcap rotation=20min
20.0 min
10.0 min
test.bro:
global rotation = 10min &redef;
redef Log::default_rotation_interval = rotation;
event bro_init() {
print(rotation);
print(Log::default_rotation_interval);
}
I suppose the reason for this is the order in which variables are initialized.
Can someone please explain?
Thanks!
Franky
More information about the Bro
mailing list