mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-20 07:41:47 -09:00
package/chrony: add 50-chrony.list for systemd-timedated
systemd-timedated discovers NTP services from ntp-units.d/*.list.
Buildroot's chrony package never installs one: on a systemd image
without timesyncd, 'timedatectl status' reports
NTP service: n/a
and 'timedatectl set-ntp on' fails with
Failed to set ntp: NTP not supported
even though chronyd is running.
Install 50-chrony.list, following the convention set by Debian,
Fedora and Arch, so timedatectl can manage chrony.
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Scott Fan <fancp2007@gmail.com>
Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
6c9c2b71e6
commit
079f168792
1
package/chrony/50-chrony.list
Normal file
1
package/chrony/50-chrony.list
Normal file
@@ -0,0 +1 @@
|
||||
chrony.service
|
||||
@@ -85,6 +85,9 @@ endef
|
||||
define CHRONY_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 package/chrony/chrony.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/chrony.service
|
||||
# advertise chrony.service to systemd-timedated
|
||||
$(INSTALL) -D -m 644 $(CHRONY_PKGDIR)/50-chrony.list \
|
||||
$(TARGET_DIR)/usr/lib/systemd/ntp-units.d/50-chrony.list
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
|
||||
Reference in New Issue
Block a user