suricata: clean dump-config output

When user asks for a configuration dump, it is useless to display
the version and CPU info. Also initializing the log system conduct
to overwrite the some log files and in particular suricata.log and
this is annoying as a command should not interfere with a running
daemon.
pull/1743/head
Eric Leblond 10 years ago committed by Victor Julien
parent c06dfe6e26
commit 9672e16323

@ -2226,6 +2226,11 @@ int main(int argc, char **argv)
exit(EXIT_FAILURE);
}
if (suri.run_mode == RUNMODE_DUMP_CONFIG) {
ConfDump();
exit(EXIT_SUCCESS);
}
/* Since our config is now loaded we can finish configurating the
* logging module. */
SCLogLoadConfig(suri.daemon, suri.verbose);
@ -2234,11 +2239,6 @@ int main(int argc, char **argv)
UtilCpuPrintSummary();
if (suri.run_mode == RUNMODE_DUMP_CONFIG) {
ConfDump();
exit(EXIT_SUCCESS);
}
if (PostConfLoadedSetup(&suri) != TM_ECODE_OK) {
exit(EXIT_FAILURE);
}

Loading…
Cancel
Save