summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2018-03-09 01:07:42 +0100
committerAndreas Oberritter <obi@opendreambox.org>2020-07-02 12:18:39 +0200
commit5206c8cf140b29e4dd0ff1a9872fda00ed9e9f25 (patch)
tree28a434fc0d5664f0b7923bd89b83fa8fe14c26fe
parent4ae21e7db436af2b3cda9138db76ed890b7c4f00 (diff)
downloadopenembedded-core-contrib-5206c8cf140b29e4dd0ff1a9872fda00ed9e9f25.tar.gz
systemd: Don't install resolv.conf symlink when resolved is disabled
There's no point in letting systemd install it, if systemd doesn't provide DNS. Let other services like resolvconf or connman do that, because only they know the location they expect. This also fixes a problem during do_rootfs with apt and dpkg's update-alternatives: | update-alternatives: error: alternative path /etc/resolv-conf.systemd doesn't exist | dpkg: error processing package systemd:armhf (--configure): | subprocess installed post-installation script returned error exit status 2 Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
-rw-r--r--meta/recipes-core/systemd/systemd_243.2.bb7
1 files changed, 1 insertions, 6 deletions
diff --git a/meta/recipes-core/systemd/systemd_243.2.bb b/meta/recipes-core/systemd/systemd_243.2.bb
index 082eb4c384..15ccf66afe 100644
--- a/meta/recipes-core/systemd/systemd_243.2.bb
+++ b/meta/recipes-core/systemd/systemd_243.2.bb
@@ -267,12 +267,7 @@ do_install() {
if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)}
fi
- if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then
- echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
- echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
- echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
- ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
- else
+ if ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then
sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
fi