systemd: Correct tmpfile.d file for resolv.conf

The tmpfiles config for systemd-resolve has been split out [1],
so correct tmpfile.d file for resolv.conf in our recipe accordingly.

[ YOCTO # 15768]

[1] b15f6eae42

(From OE-Core rev: a3020c11c91304b7400bc19f80e44e7d3720281d)

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Mingli Yu 2025-04-15 11:50:16 +08:00 committed by Richard Purdie
parent 79fa12ae4b
commit 4dd76f5edf

View File

@ -360,7 +360,7 @@ do_install() {
ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
else else
resolv_conf="${@bb.utils.contains('RESOLV_CONF', 'stub-resolv', 'run/systemd/resolve/stub-resolv.conf', 'run/systemd/resolve/resolv.conf', d)}" resolv_conf="${@bb.utils.contains('RESOLV_CONF', 'stub-resolv', 'run/systemd/resolve/stub-resolv.conf', 'run/systemd/resolve/resolv.conf', d)}"
sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../${resolv_conf}%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../${resolv_conf}%g" ${D}${exec_prefix}/lib/tmpfiles.d/systemd-resolve.conf
ln -s ../${resolv_conf} ${D}${sysconfdir}/resolv-conf.systemd ln -s ../${resolv_conf} ${D}${sysconfdir}/resolv-conf.systemd
fi fi
if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'false', 'true', d)}; then if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'false', 'true', d)}; then