summaryrefslogtreecommitdiff
path: root/units/systemd-timedated-ntp.target
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-04-25 16:49:02 +0200
committerLennart Poettering <lennart@poettering.net>2012-04-25 16:49:02 +0200
commite2875c46936a16efc0f58f9e6e2570cdda8d6d98 (patch)
tree7d21facecc4f00e6f046421208185c5f3ebadc52 /units/systemd-timedated-ntp.target
parentbc2f673ec24b59948fcfc35b3077fda0314e69d8 (diff)
timedated: introduce systemd-timedated-ntp.target which is controlled by timedated's NTP setting
We shouldn't hardcode the name of the NTP implementation in the timedated mechanism, especially since Fedora currently switched from NTP to chrony. This patch introduces a new target that is enabled/disabled instead of the actual NTP implementation. The various NTP implementations should then add .wants/ symlinks to their services and BindTo back to the target, so that their implementations are started/stopped jointly with the target. https://bugzilla.redhat.com/show_bug.cgi?id=815748
Diffstat (limited to 'units/systemd-timedated-ntp.target')
-rw-r--r--units/systemd-timedated-ntp.target17
1 files changed, 17 insertions, 0 deletions
diff --git a/units/systemd-timedated-ntp.target b/units/systemd-timedated-ntp.target
new file mode 100644
index 0000000000..128424857d
--- /dev/null
+++ b/units/systemd-timedated-ntp.target
@@ -0,0 +1,17 @@
+# 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.
+
+# This target is enabled/disabled via the timedated mechanism when the
+# user asks for it via the UI. NTP implementations should hook
+# themselves into this target via .wants/ symlinks, and then add
+# BindTo= on this target so that they are stopped when it goes away.
+
+[Unit]
+Description=Network Time Protocol
+
+[Install]
+WantedBy=multi-user.target