mirror of
https://github.com/systemd/systemd.git
synced 2024-11-27 12:13:33 +08:00
journal: remove all of /run/log/journal when serializing, since the machine ID might deviate
This commit is contained in:
parent
4ca86bbc25
commit
4a299a7ad5
@ -2147,11 +2147,8 @@ finish:
|
||||
journal_file_close(s->runtime_journal);
|
||||
s->runtime_journal = NULL;
|
||||
|
||||
if (r >= 0) {
|
||||
char path[] = "/run/log/journal/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
|
||||
sd_id128_to_string(machine, path + 17);
|
||||
rm_rf(path, false, true, false);
|
||||
}
|
||||
if (r >= 0)
|
||||
rm_rf("/run/log/journal", false, true, false);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user