diff mbox series

[meta-networking] chrony: add support for config and source snippet includes

Message ID 20220824161153.17451-1-jlu@pengutronix.de
State Under Review
Headers show
Series [meta-networking] chrony: add support for config and source snippet includes | expand

Commit Message

Jan Lübbe Aug. 24, 2022, 4:11 p.m. UTC
This makes it simpler to set specific config options or custom sources
by adding snippet files to /etc/chrony/conf.d/ or /etc/chrony/sources.d/
instead of modifying a copy of the full configuration file. As new
snippets can be added from separate recipes, targeted changes can be
done in multiple layers.

These specific directories are also used in Debian's default
configuration. It is not an error if they are missing.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
---
 meta-networking/recipes-support/chrony/chrony/chrony.conf | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/meta-networking/recipes-support/chrony/chrony/chrony.conf b/meta-networking/recipes-support/chrony/chrony/chrony.conf
index 8d226d31a5e5..d11e2d406925 100644
--- a/meta-networking/recipes-support/chrony/chrony/chrony.conf
+++ b/meta-networking/recipes-support/chrony/chrony/chrony.conf
@@ -1,3 +1,6 @@ 
+# Load config files matching the /etc/chrony/conf.d/*.conf pattern.
+confdir /etc/chrony/conf.d
+
 # Use public NTP servers from the pool.ntp.org project.
 # Please consider joining the pool project if possible by running your own
 # server(s).
@@ -17,6 +20,10 @@  pool 0.openembedded.pool.ntp.org iburst
 #		gpios = <&ps7_gpio_0 56 0>;
 #	};
 
+# Load source files matching the /etc/chrony/sources.d/*.sources pattern.
+# These can be reloaded using 'chronyc reload sources'.
+sourcedir /etc/chrony/sources.d
+
 # In first three updates step the system clock instead of slew
 # if the adjustment is larger than 1 second.
 makestep 1.0 3