aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChangqing Li <changqing.li@windriver.com>2022-06-22 17:38:17 +0800
committerArmin Kuster <akuster808@gmail.com>2022-06-22 16:26:04 -0700
commitd7aaee2c377cb4852f7cd602681967524d81126a (patch)
tree099fa596e58c01927ad2b0ab5d93b7642652a8a1
parent3d47772a01210433b6394585f213128a7be5c585 (diff)
downloadmeta-openembedded-kirkstone-next.tar.gz
meta-openembedded-kirkstone-next.tar.bz2
meta-openembedded-kirkstone-next.zip
chrony: create /var/lib/chrony by systemd-tmpfileskirkstone-next
Ensure /var/lib/chrony exist to avoid error like: chronyd.service: Failed to set up mount namespacing: /run/systemd/unit-root/var/lib/chrony: No such> chronyd.service: Failed at step NAMESPACE spawning /usr/sbin/chronyd: No such file or directory Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-networking/recipes-support/chrony/chrony_4.2.bb4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/chrony/chrony_4.2.bb b/meta-networking/recipes-support/chrony/chrony_4.2.bb
index 57dd635dc..8ce9e1db5 100644
--- a/meta-networking/recipes-support/chrony/chrony_4.2.bb
+++ b/meta-networking/recipes-support/chrony/chrony_4.2.bb
@@ -126,6 +126,10 @@ do_install() {
${D}${systemd_unitdir}/system/chronyd.service
sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/chronyd
sed -i 's!^EnvironmentFile=.*!EnvironmentFile=-${sysconfdir}/default/chronyd!' ${D}${systemd_unitdir}/system/chronyd.service
+
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ echo "d /var/lib/chrony 0755 root root -" > ${D}${sysconfdir}/tmpfiles.d/chronyd.conf
+
}
FILES:${PN} = "${sbindir}/chronyd ${sysconfdir} ${localstatedir}/lib/chrony ${localstatedir}"