summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorMaxin B. John <maxin.john@intel.com>2017-06-12 18:10:21 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-14 14:53:57 +0100
commit00e4662e55f66570cae29240c22b4d74b79d3ca5 (patch)
tree18ff94360ace06b2691d5fa74d249eb882b87f76 /meta/recipes-core
parent5db4d0dbbb7d7b0f0142da9649192b0ac2db9a7d (diff)
downloadpoky-00e4662e55f66570cae29240c22b4d74b79d3ca5.tar.gz
systemd: enable resolved and networkd
Enable systemd-resolved and systemd-networkd by default. Make it co-exist with connman and Fix associated problems in read-only rootfs. Fixes [YOCTO #11331] (From OE-Core rev: d9b6d538e3d81ab0d5e7b7b6adecef555d782217) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/systemd/systemd_232.bb13
1 files changed, 10 insertions, 3 deletions
diff --git a/meta/recipes-core/systemd/systemd_232.bb b/meta/recipes-core/systemd/systemd_232.bb
index f843c58869..6aeccbd422 100644
--- a/meta/recipes-core/systemd/systemd_232.bb
+++ b/meta/recipes-core/systemd/systemd_232.bb
@@ -62,6 +62,8 @@ PACKAGECONFIG ??= "xz \
62 firstboot \ 62 firstboot \
63 utmp \ 63 utmp \
64 polkit \ 64 polkit \
65 resolved \
66 networkd \
65" 67"
66PACKAGECONFIG_remove_libc-musl = "selinux" 68PACKAGECONFIG_remove_libc-musl = "selinux"
67PACKAGECONFIG_remove_libc-musl = "smack" 69PACKAGECONFIG_remove_libc-musl = "smack"
@@ -244,9 +246,10 @@ do_install() {
244 echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf 246 echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
245 echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf 247 echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
246 echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf 248 echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
247 ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv.conf 249 ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
248 else 250 else
249 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 251 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
252 ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
250 fi 253 fi
251 install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install 254 install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
252} 255}
@@ -451,7 +454,7 @@ FILES_${PN} = " ${base_bindir}/* \
451 ${sysconfdir}/tmpfiles.d/ \ 454 ${sysconfdir}/tmpfiles.d/ \
452 ${sysconfdir}/xdg/ \ 455 ${sysconfdir}/xdg/ \
453 ${sysconfdir}/init.d/README \ 456 ${sysconfdir}/init.d/README \
454 ${sysconfdir}/resolv.conf \ 457 ${sysconfdir}/resolv-conf.systemd \
455 ${rootlibexecdir}/systemd/* \ 458 ${rootlibexecdir}/systemd/* \
456 ${systemd_unitdir}/* \ 459 ${systemd_unitdir}/* \
457 ${base_libdir}/security/*.so \ 460 ${base_libdir}/security/*.so \
@@ -535,7 +538,7 @@ python __anonymous() {
535# TODO: 538# TODO:
536# u-a for runlevel and telinit 539# u-a for runlevel and telinit
537 540
538ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel" 541ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel resolv-conf"
539 542
540ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd" 543ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
541ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init" 544ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
@@ -561,6 +564,10 @@ ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
561ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel" 564ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
562ALTERNATIVE_PRIORITY[runlevel] ?= "300" 565ALTERNATIVE_PRIORITY[runlevel] ?= "300"
563 566
567ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd"
568ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"
569ALTERNATIVE_PRIORITY[resolv-conf] ?= "50"
570
564pkg_postinst_${PN} () { 571pkg_postinst_${PN} () {
565 sed -e '/^hosts:/s/\s*\<myhostname\>//' \ 572 sed -e '/^hosts:/s/\s*\<myhostname\>//' \
566 -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \ 573 -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \