]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: fix detection whether per-unit drop-ins changed
authorLennart Poettering <lennart@poettering.net>
Mon, 2 May 2016 12:50:27 +0000 (14:50 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 2 May 2016 13:10:24 +0000 (15:10 +0200)
commit87ec20ef2089712e6c9a9f3ddfba6c5e312694fe
treea306cb1247e02177440098482d3c64deb90f55f0
parent072993504e3e4206ae1019f5461a0372f7d82ddf
core: fix detection whether per-unit drop-ins changed

This fixes fall-out from 6d10d308c6cd16528ef58fa4f5822aef936862d3.

Until that commit, do determine whether a daemon reload was required we compare
the mtime of the main unit file we loaded with the mtime of it on disk for
equality, but for drop-ins we only stored the newest mtime of all of them and
then did a "newer-than" comparison. This was brokeni with the above commit,
when all checks where changed to be for equality.

With this change all checks are now done as "newer-than", fixing the drop-in
mtime case. Strictly speaking this will not detect a number of changes that the
code before above commit detected, but given that the mtime is unlikely to go
backwards, and this is just intended to be a helpful hint anyway, this looks OK
in order to keep things simple.

Fixes: #3123
src/core/unit.c
src/systemctl/systemctl.c