summaryrefslogtreecommitdiff
path: root/units
diff options
context:
space:
mode:
Diffstat (limited to 'units')
-rw-r--r--units/meson.build1
-rw-r--r--units/systemd-timesyncd.service.in4
-rw-r--r--units/systemd-tmpfiles-clean.service.in2
-rw-r--r--units/time-set.target13
-rw-r--r--units/time-sync.target2
5 files changed, 19 insertions, 3 deletions
diff --git a/units/meson.build b/units/meson.build
index a53632cd9d..a5610506d5 100644
--- a/units/meson.build
+++ b/units/meson.build
@@ -104,6 +104,7 @@ units = [
'sockets.target.wants/'],
['systemd-udevd-kernel.socket', '',
'sockets.target.wants/'],
+ ['time-set.target', ''],
['time-sync.target', ''],
['timers.target', ''],
['tmp.mount', '',
diff --git a/units/systemd-timesyncd.service.in b/units/systemd-timesyncd.service.in
index 6512531e1c..2d8d14f6de 100644
--- a/units/systemd-timesyncd.service.in
+++ b/units/systemd-timesyncd.service.in
@@ -14,9 +14,9 @@ ConditionCapability=CAP_SYS_TIME
ConditionVirtualization=!container
DefaultDependencies=no
After=systemd-remount-fs.service systemd-sysusers.service
-Before=time-sync.target sysinit.target shutdown.target
+Before=time-set.target sysinit.target shutdown.target
Conflicts=shutdown.target
-Wants=time-sync.target
+Wants=time-set.target time-sync.target
[Service]
AmbientCapabilities=CAP_SYS_TIME
diff --git a/units/systemd-tmpfiles-clean.service.in b/units/systemd-tmpfiles-clean.service.in
index d1025afadb..9e2f04bfef 100644
--- a/units/systemd-tmpfiles-clean.service.in
+++ b/units/systemd-tmpfiles-clean.service.in
@@ -12,7 +12,7 @@ Description=Cleanup of Temporary Directories
Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
DefaultDependencies=no
Conflicts=shutdown.target
-After=local-fs.target time-sync.target
+After=local-fs.target time-set.target
Before=shutdown.target
[Service]
diff --git a/units/time-set.target b/units/time-set.target
new file mode 100644
index 0000000000..6b40033529
--- /dev/null
+++ b/units/time-set.target
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: LGPL-2.1+
+#
+# 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=System Time Set
+Documentation=man:systemd.special(7)
+RefuseManualStart=yes
diff --git a/units/time-sync.target b/units/time-sync.target
index 1533c7c33c..9106502e8b 100644
--- a/units/time-sync.target
+++ b/units/time-sync.target
@@ -11,3 +11,5 @@
Description=System Time Synchronized
Documentation=man:systemd.special(7)
RefuseManualStart=yes
+After=time-set.target
+Wants=time-set.target