diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-06-13 12:52:31 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-06-13 13:26:32 +0200 |
commit | a55654d598c78f8e084aa6a18fec6eff900c9aed (patch) | |
tree | 12e119c56dae72ebdb9c62b74fb21163330ee5d9 /units/systemd-update-done.service.in | |
parent | update-done: add minimal tool to manage system updates for /etc and /var, if ... (diff) | |
download | systemd-a55654d598c78f8e084aa6a18fec6eff900c9aed.tar.xz systemd-a55654d598c78f8e084aa6a18fec6eff900c9aed.zip |
core: add new ConditionNeedsUpdate= unit condition
This new condition allows checking whether /etc or /var are out-of-date
relative to /usr. This is the counterpart for the update flag managed by
systemd-update-done.service. Services that want to be started once after
/usr got updated should use:
[Unit]
ConditionNeedsUpdate=/etc
Before=systemd-update-done.service
This makes sure that they are only run if /etc is out-of-date relative
to /usr. And that it will be executed after systemd-update-done.service
which is responsible for marking /etc up-to-date relative to the current
/usr.
ConditionNeedsUpdate= will also checks whether /etc is actually
writable, and not trigger if it isn't, since no update is possible then.
Diffstat (limited to '')
-rw-r--r-- | units/systemd-update-done.service.in | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/units/systemd-update-done.service.in b/units/systemd-update-done.service.in index dccb5137d2..1a907f9637 100644 --- a/units/systemd-update-done.service.in +++ b/units/systemd-update-done.service.in @@ -14,6 +14,8 @@ After=systemd-readahead-collect.service systemd-readahead-replay.service local-f Before=sysinit.target shutdown.target RefuseManualStart=yes RefuseManualStop=yes +ConditionNeedsUpdate=|/etc +ConditionNeedsUpdate=|/var [Service] Type=oneshot |