2020-11-09 07:23:58 +03:00
# SPDX-License-Identifier: LGPL-2.1-or-later
2018-03-21 14:42:04 +03:00
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description = Wait Until Kernel Time Synchronized
Documentation = man:systemd-time-wait-sync.service(8)
2018-03-22 23:41:54 +03:00
2023-03-07 14:51:31 +03:00
# Note that this tool doesn't need CAP_SYS_TIME itself, but its primary
2023-09-19 11:02:05 +03:00
# use case is to run in conjunction with a local NTP service such as
2018-03-22 23:41:54 +03:00
# systemd-timesyncd.service, which is conditioned this way. There might be
2023-09-19 11:02:05 +03:00
# niche use cases where running this service independently is desired, but let's
2018-03-22 23:41:54 +03:00
# make this all "just work" for the general case, and leave it to local
# modifications to make it work in the remaining cases.
2018-03-22 05:27:27 +03:00
ConditionCapability = CAP_SYS_TIME
ConditionVirtualization = !container
2018-03-22 23:41:54 +03:00
2018-03-21 14:42:04 +03:00
DefaultDependencies = no
Before = time-sync.target shutdown.target
Wants = time-sync.target
Conflicts = shutdown.target
[Service]
Type = oneshot
2023-06-12 04:15:19 +03:00
ExecStart = {{LIBEXECDIR}}/systemd-time-wait-sync
2018-03-21 14:42:04 +03:00
TimeoutStartSec = infinity
RemainAfterExit = yes
[Install]
WantedBy = sysinit.target