2020-11-09 13:23:58 +09:00
# SPDX-License-Identifier: LGPL-2.1-or-later
2018-03-21 06:42:04 -05: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 21:41:54 +01:00
2023-03-07 12:51:31 +01:00
# Note that this tool doesn't need CAP_SYS_TIME itself, but its primary
2023-09-19 10:02:05 +02:00
# use case is to run in conjunction with a local NTP service such as
2018-03-22 21:41:54 +01:00
# systemd-timesyncd.service, which is conditioned this way. There might be
2023-09-19 10:02:05 +02:00
# niche use cases where running this service independently is desired, but let's
2018-03-22 21:41:54 +01: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-21 21:27:27 -05:00
ConditionCapability = CAP_SYS_TIME
ConditionVirtualization = !container
2018-03-22 21:41:54 +01:00
2018-03-21 06:42:04 -05:00
DefaultDependencies = no
Before = time-sync.target shutdown.target
Wants = time-sync.target
Conflicts = shutdown.target
[Service]
Type = oneshot
2023-06-12 02:15:19 +01:00
ExecStart = {{LIBEXECDIR}}/systemd-time-wait-sync
2018-03-21 06:42:04 -05:00
TimeoutStartSec = infinity
RemainAfterExit = yes
[Install]
WantedBy = sysinit.target