When systemd-timesyncd is used, there should be an entry in ntp-units.d.
Otherwise, timedatectl set-ntp sometimes fails with "NTP not supported".

Signed-off-by: Clemens Gruber <[email protected]>
---
 projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list | 1 +
 rules/systemd.make                                               | 1 +
 2 files changed, 2 insertions(+)
 create mode 100644 
projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list

diff --git a/projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list 
b/projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list
new file mode 100644
index 000000000..d5959ade8
--- /dev/null
+++ b/projectroot/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list
@@ -0,0 +1 @@
+systemd-timesyncd.service
diff --git a/rules/systemd.make b/rules/systemd.make
index 5564d893f..6b7ec83ab 100644
--- a/rules/systemd.make
+++ b/rules/systemd.make
@@ -432,6 +432,7 @@ ifdef PTXCONF_SYSTEMD_TIMEDATE
                /var/lib/systemd/timesync)
        @$(call install_link, systemd, ../systemd-timesyncd.service,  \
                
/usr/lib/systemd/system/sysinit.target.wants/systemd-timesyncd.service)
+       @$(call install_tree, systemd, 0, 0, -, /usr/lib/systemd/ntp-units.d/)
 endif
 
 ifdef PTXCONF_SYSTEMD_VCONSOLE
-- 
2.24.1


_______________________________________________
ptxdist mailing list
[email protected]

Reply via email to