summaryrefslogtreecommitdiffstats
path: root/src/basic
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-12-17 20:21:46 +0100
committerLennart Poettering <lennart@poettering.net>2020-12-17 20:21:46 +0100
commitfe934b42e480473afba8a29a4a0d3d0e789543ac (patch)
treee654b884b47d8cce19b8d3f7e88bbe24c30c0653 /src/basic
parentunits: don't pull in time-sync.target from systemd-timesyncd.service (diff)
downloadsystemd-fe934b42e480473afba8a29a4a0d3d0e789543ac.tar.xz
systemd-fe934b42e480473afba8a29a4a0d3d0e789543ac.zip
core: order timer units after both time-sync.target and time-set.target
If users do not enable a service like systemd-time-wait-sync.target (because they don't want to delay boot for external events, such as an NTP sync), then timers should still take the the weaker time-set.target feature into account, so that the clock is at least monotonic. Hence, order timer units after both of the targets: time-sync.target *and* time-set.target. That way, the right thing will happen regardless if people have no NTP server (and thus also no systemd-time-wait-sync.service or equivalent) or, only have an NTP server (and no systemd-time-wait-sync.service), or have both. Ordering after time-set.target is basically "free". The logic it is backed by should be instant, without communication with the outside going on. It's useful still so that time servers that implement the timestamp from /var/ logic can run in later boot.
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/special.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/special.h b/src/basic/special.h
index d55b3289de..b9b7be7a7d 100644
--- a/src/basic/special.h
+++ b/src/basic/special.h
@@ -42,6 +42,7 @@
#define SPECIAL_SWAP_TARGET "swap.target"
#define SPECIAL_NETWORK_ONLINE_TARGET "network-online.target"
#define SPECIAL_TIME_SYNC_TARGET "time-sync.target" /* LSB's $time */
+#define SPECIAL_TIME_SET_TARGET "time-set.target"
#define SPECIAL_BASIC_TARGET "basic.target"
/* LSB compatibility */