Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Andreas Oberritter <obi@opendreambox.org>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH v8] connman: ignore the networking device which nfs for rootfs is working on
Date: Sun, 08 Dec 2013 12:43:25 +0100	[thread overview]
Message-ID: <52A45B5D.90600@opendreambox.org> (raw)
In-Reply-To: <1384242441-27215-1-git-send-email-rongqing.li@windriver.com>

Hello Roy,

On 12.11.2013 08:47, rongqing.li@windriver.com wrote:
> From: Roy Li <rongqing.li@windriver.com>
> 
> Create connman-evn.service, which will run a script to compute the networking
                 ^^^
this should read connman-env.service.

> device when nfs root is on, and pass the result to connman.service
> 
> Connmand.service add ExecStartPre into Connmand.service to release
> do_configure_append work, use the options which is passed by connman-evn.service
> 
> Signed-off-by: Roy Li <rongqing.li@windriver.com>
> ---
>  meta/recipes-connectivity/connman/connman.inc      |   17 +++++-----
>  .../connman/connman/connman-env.service            |   13 ++++++++
>  .../connman/connman/connmand-env                   |   26 +++++++++++++++
>  ...ardcode-and-add-EnvironmentFile-and-Wants.patch |   33 ++++++++++++++++++++
>  meta/recipes-connectivity/connman/connman_1.19.bb  |    3 ++
>  5 files changed, 85 insertions(+), 7 deletions(-)
>  create mode 100644 meta/recipes-connectivity/connman/connman/connman-env.service
>  create mode 100644 meta/recipes-connectivity/connman/connman/connmand-env
>  create mode 100644 meta/recipes-connectivity/connman/connman/replace-hardcode-and-add-EnvironmentFile-and-Wants.patch
> 
> diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
> index 12f3edd..648b9f6 100644
> --- a/meta/recipes-connectivity/connman/connman.inc
> +++ b/meta/recipes-connectivity/connman/connman.inc
> @@ -64,15 +64,9 @@ python __anonymous () {
>  
>  SYSTEMD_SERVICE_${PN} = "connman.service"
>  SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service"
> -SYSTEMD_WIRED_SETUP = "ExecStartPre=-${libdir}/connman/wired-setup"
>  
>  inherit autotools gtk-doc pkgconfig systemd update-rc.d
>  
> -do_configure_append () {
> -	sed -i "s#ExecStart=#${SYSTEMD_WIRED_SETUP}\nExecStart=#" ${S}/src/connman.service
> -
> -}
> -
>  # This allows *everyone* to access ConnMan over DBus, without any access
>  # control.  Really the at_console flag should work, which would mean that
>  # both this and the xuser patch can be dropped.
> @@ -88,6 +82,15 @@ do_install_append() {
>  		sed -i s%@LIBDIR@%${libdir}% ${D}${sysconfdir}/init.d/connman
>  	fi
>  
> +	if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
> +		install -m 0755 ${WORKDIR}/connmand-env ${D}${sbindir}/
> +		install -m 0644 ${WORKDIR}/connman-env.service  ${D}/${systemd_unitdir}/system/
> +		sed -i  -e 's,@SBINDIR@,${sbindir},g' \
> +			-e 's,@LIBDIR@,${libdir},g' \
> +			-e 's,@LOCALSTATEDIR@,${localstatedir},g' \
> +			${D}${systemd_unitdir}/system/*.service
> +	fi
> +
>  	install -d ${D}${bindir}
>  	install -m 0755 ${S}/tools/*-test ${D}${bindir}
>  	if [ -e ${S}/tools/wispr ]; then
> @@ -163,7 +166,7 @@ FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \
>              ${libdir}/connman/plugins \
>              ${sysconfdir} ${sharedstatedir} ${localstatedir} \
>              ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \
> -            ${datadir}/dbus-1/system-services/*"
> +            ${datadir}/dbus-1/system-services/* ${systemd_unitdir}/system/connman-env.service"
>  
>  FILES_${PN}-dbg += "${libdir}/connman/*/.debug"
>  
> diff --git a/meta/recipes-connectivity/connman/connman/connman-env.service b/meta/recipes-connectivity/connman/connman/connman-env.service
> new file mode 100644
> index 0000000..c4dc278
> --- /dev/null
> +++ b/meta/recipes-connectivity/connman/connman/connman-env.service
> @@ -0,0 +1,13 @@
> +[Unit]
> +Description=Generate options for connection service
> +Before=connman.service
> +ConditionKernelCommandLine=root=/dev/nfs

I received a report of this test failing. It turned out that
root=/dev/nfs is not mandatory. nfsroot=$ip:$path may be used alternatively.

Regards,
Andreas


      parent reply	other threads:[~2013-12-08 11:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-12  7:47 [PATCH v8] connman: ignore the networking device which nfs for rootfs is working on rongqing.li
2013-11-20  8:25 ` Rongqing Li
2013-12-07  6:55   ` Rongqing Li
2013-12-09 11:20   ` Enrico Scholz
2013-12-08 11:43 ` Andreas Oberritter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52A45B5D.90600@opendreambox.org \
    --to=obi@opendreambox.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox