main: dump history by default

Always write the measurement history on exit when the dump directory is
specified and silently ignore the dumponexit directive. There doesn't
seem to be a good use case for dumpdir and -r without dumponexit as the
history would be invalidated by adjustments of the clock that happened
between the dump command and chronyd exit.
This commit is contained in:
Miroslav Lichvar
2017-03-08 10:45:20 +01:00
parent 539ef3f770
commit f3a16383b9
5 changed files with 11 additions and 37 deletions

2
main.c
View File

@@ -97,7 +97,7 @@ MAI_CleanupAndExit(void)
{
if (!initialised) exit(exit_status);
if (CNF_GetDumpOnExit()) {
if (CNF_GetDumpDir()[0] != '\0') {
SRC_DumpSources();
}