summaryrefslogtreecommitdiff
path: root/src/core/load-fragment-gperf.gperf.m4
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-06-13 12:52:31 +0200
committerLennart Poettering <lennart@poettering.net>2014-06-13 13:26:32 +0200
commita55654d598c78f8e084aa6a18fec6eff900c9aed (patch)
tree12e119c56dae72ebdb9c62b74fb21163330ee5d9 /src/core/load-fragment-gperf.gperf.m4
parent8ea48dfcd33e8db0c01bf8c57c3bbcfdc3c86d4b (diff)
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 'src/core/load-fragment-gperf.gperf.m4')
-rw-r--r--src/core/load-fragment-gperf.gperf.m41
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4
index 2d98bba419..d97c5c6f5b 100644
--- a/src/core/load-fragment-gperf.gperf.m4
+++ b/src/core/load-fragment-gperf.gperf.m4
@@ -161,6 +161,7 @@ Unit.ConditionPathIsReadWrite, config_parse_unit_condition_path, CONDITION_P
Unit.ConditionDirectoryNotEmpty, config_parse_unit_condition_path, CONDITION_DIRECTORY_NOT_EMPTY, 0
Unit.ConditionFileNotEmpty, config_parse_unit_condition_path, CONDITION_FILE_NOT_EMPTY, 0
Unit.ConditionFileIsExecutable, config_parse_unit_condition_path, CONDITION_FILE_IS_EXECUTABLE, 0
+Unit.ConditionNeedsUpdate, config_parse_unit_condition_path, CONDITION_NEEDS_UPDATE, 0
Unit.ConditionKernelCommandLine, config_parse_unit_condition_string, CONDITION_KERNEL_COMMAND_LINE, 0
Unit.ConditionArchitecture, config_parse_unit_condition_string, CONDITION_ARCHITECTURE, 0
Unit.ConditionVirtualization, config_parse_unit_condition_string, CONDITION_VIRTUALIZATION, 0