systemd-time-wait-sync.service 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # SPDX-License-Identifier: LGPL-2.1+
  2. #
  3. # This file is part of systemd.
  4. #
  5. # systemd is free software; you can redistribute it and/or modify it
  6. # under the terms of the GNU Lesser General Public License as published by
  7. # the Free Software Foundation; either version 2.1 of the License, or
  8. # (at your option) any later version.
  9. [Unit]
  10. Description=Wait Until Kernel Time Synchronized
  11. Documentation=man:systemd-time-wait-sync.service(8)
  12. # Note that this tool doesn't need CAP_SYS_TIME itself, but it's primary
  13. # usecase is to run in conjunction with a local NTP service such as
  14. # systemd-timesyncd.service, which is conditioned this way. There might be
  15. # niche usecases where running this service independently is desired, but let's
  16. # make this all "just work" for the general case, and leave it to local
  17. # modifications to make it work in the remaining cases.
  18. ConditionCapability=CAP_SYS_TIME
  19. ConditionVirtualization=!container
  20. DefaultDependencies=no
  21. Before=time-sync.target shutdown.target
  22. Wants=time-sync.target
  23. Conflicts=shutdown.target
  24. [Service]
  25. Type=oneshot
  26. ExecStart=/lib/systemd/systemd-time-wait-sync
  27. TimeoutStartSec=infinity
  28. RemainAfterExit=yes
  29. [Install]
  30. WantedBy=sysinit.target