aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-12-16 14:07:31 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-22 08:46:34 +0000
commit99d1199fd0961f94732a1a533d66472ca17cf6f5 (patch)
treed1633c73e6d0d666099812daa2b2bfc60f0f2f2f
parent99000d8bc30fe1eed60499140efa3a4cf0360478 (diff)
downloadopenembedded-core-contrib-99d1199fd0961f94732a1a533d66472ca17cf6f5.tar.gz
openembedded-core-contrib-99d1199fd0961f94732a1a533d66472ca17cf6f5.tar.bz2
openembedded-core-contrib-99d1199fd0961f94732a1a533d66472ca17cf6f5.zip
systemd: point to correct resolv.conf when resolved is enabled
latest systemd has changed the resolved defaults which points to 127.0.0.53 port 53 on local network. If someone wants to use host-local IP address then it can be pointed to copy in /lib/systemd Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/recipes-core/systemd/systemd_232.bb11
1 files changed, 6 insertions, 5 deletions
diff --git a/meta/recipes-core/systemd/systemd_232.bb b/meta/recipes-core/systemd/systemd_232.bb
index 5b45eb221aa..9b76b6907bf 100644
--- a/meta/recipes-core/systemd/systemd_232.bb
+++ b/meta/recipes-core/systemd/systemd_232.bb
@@ -237,11 +237,12 @@ do_install() {
${@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
- # if resolved is disabled, it won't handle the link of resolv.conf, so
- # set it up ourselves
- ln -s ../run/resolv.conf ${D}${sysconfdir}/resolv.conf
- echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
- echo 'f /run/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
+ 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
+ else
+ 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
fi
install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
}