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

Darren Hart dvhart at linux.intel.com
Wed Nov 19 11:40:41 PST 2014



On 11/19/14 07:08, Khan, Yasir wrote:
> 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

This should be =, not ==, to be POSIX shell compliant (== is a bashism).

Also, I'm not seeing similar tests elsewhere, is there a more standard
way to handle such things for systemd/networkd? Ross?

> +               install -m 0644 ${WORKDIR}/10-dhcp.network ${D}${sysconfdir}/systemd/network/dhcp.network
> +       fi

Thanks,

-- 
Darren Hart
Intel Open Source Technology Center


More information about the meta-intel mailing list