summaryrefslogtreecommitdiff
path: root/units/systemd-time-wait-sync.service.in
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-03-22 21:41:54 +0100
committerEvgeny Vereshchagin <evvers@ya.ru>2018-03-22 23:41:54 +0300
commitc5beecca19f02cc81408d2ed942d96f9724091d5 (patch)
treef7c9a34f8556e207b967d74f61dfba0c00f7bf0a /units/systemd-time-wait-sync.service.in
parent1147eef0b6a5937526247ff81ca1e5e45205ed16 (diff)
downloadsystemd-c5beecca19f02cc81408d2ed942d96f9724091d5.tar.gz
units: document why systemd-time-wait-sync.service conditions on CAP_SYS_TIME (#8555)
As requested by @evverx in https://github.com/systemd/systemd/pull/8537#issuecomment-375122615
Diffstat (limited to 'units/systemd-time-wait-sync.service.in')
-rw-r--r--units/systemd-time-wait-sync.service.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/units/systemd-time-wait-sync.service.in b/units/systemd-time-wait-sync.service.in
index bed4177916..475182d6bc 100644
--- a/units/systemd-time-wait-sync.service.in
+++ b/units/systemd-time-wait-sync.service.in
@@ -10,8 +10,17 @@
[Unit]
Description=Wait Until Kernel Time Synchronized
Documentation=man:systemd-time-wait-sync.service(8)
+
+# Note that this tool doesn't need CAP_SYS_TIME itself, but it's primary
+# usecase is to run in conjunction with a local NTP service such as
+# systemd-timesyncd.service, which is conditioned this way. There might be
+# niche usecases where running this service independently is desired, but let's
+# make this all "just work" for the general case, and leave it to local
+# modifications to make it work in the remaining cases.
+
ConditionCapability=CAP_SYS_TIME
ConditionVirtualization=!container
+
DefaultDependencies=no
Before=time-sync.target shutdown.target
Wants=time-sync.target