[meta-intel] [MinnowBoard][PATCH] systemd: Conditionally add network file for systemd

Khan, Yasir Yasir_Khan at mentor.com
Wed Nov 19 07:08:07 PST 2014


A network file is required by systemd to configure network
interfaces. To enable systemd based network configuration,
"networkd" is required in the PACKAGECONFIG without which
this file is redundant. So only add this file when network
configuration is enabled in systemd.

Signed-off-by: Yasir-Khan <yasir_khan at mentor.com>
---
 recipes-core/systemd/systemd_%.bbappend |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/recipes-core/systemd/systemd_%.bbappend b/recipes-core/systemd/systemd_%.bbappend
index 0ba3368..0a65d07 100644
--- a/recipes-core/systemd/systemd_%.bbappend
+++ b/recipes-core/systemd/systemd_%.bbappend
@@ -3,5 +3,8 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 SRC_URI_append_minnow = " file://10-dhcp.network"

 do_install_append_minnow () {
-        install -m 0644 ${WORKDIR}/10-dhcp.network ${D}${sysconfdir}/systemd/network/dhcp.network
+       USE_NETWORKD="${@base_contains('PACKAGECONFIG', 'networkd', 'yes', 'no', d)}"
+       if [ x$USE_NETWORKD == "xyes" ]; then
+               install -m 0644 ${WORKDIR}/10-dhcp.network ${D}${sysconfdir}/systemd/network/dhcp.network
+       fi
 }
--
1.7.9.5


More information about the meta-intel mailing list