mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
core/unit: follow merged units before updating SourcePath= timestamp too
Currently, we only follow merged units for unit_load_dropin() call. But if the unit is an alias, we should always perform operations on the "canonical" unit.
This commit is contained in:
parent
3f1764dcfc
commit
740cd1e0f2
@ -1402,11 +1402,13 @@ int unit_load_fragment_and_dropin(Unit *u, bool fragment_required) {
|
||||
u->load_state = UNIT_LOADED;
|
||||
}
|
||||
|
||||
u = unit_follow_merge(u);
|
||||
|
||||
/* Load drop-in directory data. If u is an alias, we might be reloading the
|
||||
* target unit needlessly. But we cannot be sure which drops-ins have already
|
||||
* been loaded and which not, at least without doing complicated book-keeping,
|
||||
* so let's always reread all drop-ins. */
|
||||
r = unit_load_dropin(unit_follow_merge(u));
|
||||
r = unit_load_dropin(u);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user