aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2018-03-09 01:07:42 +0100
committerAndreas Oberritter <obi@opendreambox.org>2018-03-09 01:31:11 +0100
commit66c8532b4975b5b9edd8b347a8940735af23a11e (patch)
tree36369391ac697957182b754253418aefdd23bab0
parent2412c5caeafaa0521ff4f28afcb8e895780d55bc (diff)
downloadopenembedded-core-contrib-obi/rocko.tar.gz
openembedded-core-contrib-obi/rocko.tar.bz2
openembedded-core-contrib-obi/rocko.zip
systemd: Don't install resolv.conf symlink when resolved is disabledobi/rocko
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_234.bb9
1 files changed, 2 insertions, 7 deletions
diff --git a/meta/recipes-core/systemd/systemd_234.bb b/meta/recipes-core/systemd/systemd_234.bb
index 9ce27bf67a..34d1cdc6da 100644
--- a/meta/recipes-core/systemd/systemd_234.bb
+++ b/meta/recipes-core/systemd/systemd_234.bb
@@ -263,12 +263,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
@@ -576,7 +571,7 @@ python __anonymous() {
# TODO:
# u-a for runlevel and telinit
-ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel resolv-conf"
+ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolve-conf', '', d)}"
ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"