summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2015-11-04 20:19:19 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-11 23:26:30 +0000
commitb80da02ce9b683f96393fe0ea1f5f1a5f1a07c89 (patch)
tree25b8410a12642c12f2b4b0d60a8523d0cfb6e450 /meta
parent5548a76a3c218381a34f021c9d80aa0ace6aa3f5 (diff)
downloadpoky-b80da02ce9b683f96393fe0ea1f5f1a5f1a07c89.tar.gz
systemd: arrange for volatile /etc/resolv.conf
On sysvinit systems, volatiles is configured to make /etc/resolv.conf symlink to a file in a volatile path, which lets us write to /etc/resolv.conf for read-only-rootfs. For systemd, this isn't set up unless we enable systemd-resolved, which we don't by default. When it's not enabled, create the /etc/resolv.conf symlink and ensure the volatile path is created on boot with tmpfiles.d. (From OE-Core rev: 7f087f161e8942bcd35f88999dfca418f01cd7fa) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/systemd/systemd_228.bb8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd_228.bb b/meta/recipes-core/systemd/systemd_228.bb
index df8813ac42..aa2e846b69 100644
--- a/meta/recipes-core/systemd/systemd_228.bb
+++ b/meta/recipes-core/systemd/systemd_228.bb
@@ -203,6 +203,13 @@ do_install() {
203 if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then 203 if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
204 ${@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)} 204 ${@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)}
205 fi 205 fi
206 if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then
207 # if resolved is disabled, it won't handle the link of resolv.conf, so
208 # set it up ourselves
209 ln -s ../run/resolv.conf ${D}${sysconfdir}/resolv.conf
210 echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
211 echo 'f /run/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
212 fi
206 install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install 213 install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
207} 214}
208 215
@@ -297,6 +304,7 @@ FILES_${PN} = " ${base_bindir}/* \
297 ${sysconfdir}/tmpfiles.d/ \ 304 ${sysconfdir}/tmpfiles.d/ \
298 ${sysconfdir}/xdg/ \ 305 ${sysconfdir}/xdg/ \
299 ${sysconfdir}/init.d/README \ 306 ${sysconfdir}/init.d/README \
307 ${sysconfdir}/resolv.conf \
300 ${rootlibexecdir}/systemd/* \ 308 ${rootlibexecdir}/systemd/* \
301 ${systemd_unitdir}/* \ 309 ${systemd_unitdir}/* \
302 ${base_libdir}/security/*.so \ 310 ${base_libdir}/security/*.so \