mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
core: fragments of masked units ought not be considered for NeedDaemonReload (#7060)
The units that are not loaded don't have dropin_paths set. This currently results in units that have fragments to always have NeedDaemonReload=true when masked: $ find {/usr/lib,/run/user/8086}/systemd/user/meh.service* |xargs ls -ld lrwxrwxrwx. 1 lkundrak lkundrak 9 Oct 11 11:19 /run/user/8086/systemd/user/meh.service -> /dev/null -rw-rw-r--. 1 root root 49 Oct 11 10:16 /usr/lib/systemd/user/meh.service drwxrwxr-x. 2 root root 4096 Oct 11 10:50 /usr/lib/systemd/user/meh.service.d -rw-rw-r--. 1 root root 666 Oct 11 10:50 /usr/lib/systemd/user/meh.service.d/override.conf $ systemctl --user daemon-reload $ busctl --user get-property org.freedesktop.systemd1 \ /org/freedesktop/systemd1/unit/meh_2eservice \ org.freedesktop.systemd1.Unit NeedDaemonReload b true
This commit is contained in:
parent
895265ad7d
commit
19a44dfe45
@ -3485,7 +3485,8 @@ bool unit_need_daemon_reload(Unit *u) {
|
||||
if (fragment_mtime_newer(u->source_path, u->source_mtime, false))
|
||||
return true;
|
||||
|
||||
(void) unit_find_dropin_paths(u, &t);
|
||||
if (u->load_state == UNIT_LOADED)
|
||||
(void) unit_find_dropin_paths(u, &t);
|
||||
if (!strv_equal(u->dropin_paths, t))
|
||||
return true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user