network: do not try to save link state file twice on boot

On enumeration, (that is, before manager_start() is called), enumerated
links may already have the dirty flag. In that case, saving the state
file in manager_start() should clear the flag.
This commit is contained in:
Yu Watanabe
2023-10-24 18:13:08 +09:00
parent cf6416612c
commit ac4a69500e

View File

@@ -692,7 +692,7 @@ int manager_start(Manager *m) {
log_warning_errno(r, "Failed to update state file %s, ignoring: %m", m->state_file);
HASHMAP_FOREACH(link, m->links_by_index) {
r = link_save(link);
r = link_save_and_clean(link);
if (r < 0)
log_link_warning_errno(link, r, "Failed to update link state file %s, ignoring: %m", link->state_file);
}