From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f46.google.com (mail-lf0-f46.google.com [209.85.215.46]) by mail.openembedded.org (Postfix) with ESMTP id 3CC7D60770 for ; Tue, 11 Oct 2016 19:03:00 +0000 (UTC) Received: by mail-lf0-f46.google.com with SMTP id b81so53588681lfe.1 for ; Tue, 11 Oct 2016 12:03:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=8sd/SLaI1LnaRHKpCCf1lo1BtEeH58s7OjUhPW3WpzY=; b=ue8Xz91LOIVFD4B8Op8FSsKunQEsBGpuRz/11gQ/Tc5DAea86ni+nME54+yAkLpzif 2h9Ob9Op3eDKS0usGuuad0+nwTTc2XOd4d068S9uKe2ogop+K946cm1TC1z1ZKRIsQx5 S/80gg5EUDa8d+CeyVbuJsv9sFS/+1pk3II8+m2TSxBFuztA9ckjwspr4gE7EpXbBCKK G0kVlM0aBWLDKpVaxdQSdCR6Kl5/ut//H0B9g2/KHUFPuMLxV/WwYxVR10JPH208ur6J U+LinGegV6uPh8VLTVwdW+MU0usbCDpY4AR0uFUHQ/hIs2rbMWLgy9GJv0iHKiBtk39X xu2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=8sd/SLaI1LnaRHKpCCf1lo1BtEeH58s7OjUhPW3WpzY=; b=TX8kgOsTLaLk7wGJFFGG3ktxB6v8DGmwPItwZZB+nKukEJCU7kqyAE7F0b0pJwKLDb gMSLVfFscdpFg/SYLqVlYVlh92e4xoI2FaCsVNtzbNxku5qolk6sOUO6Y/mPBDt2WqAN /AZ2e8wnEE3qwQ0pJ+1ytG4vAfr41DDLHq3fnvKn+/3HFNiwbHLV/VRO+spbzZb+ELwr plfN++csxa/P4CLQaWvJBNWWP5AKrhXUkVdH6ExWypcoYPEs/JroAPfOyMgkeJXU026g cXa35mzvgU8CdRWwEpTJEw2k5ghBC8DDF/Sv6IECj8sPGX54xI0mWu4lWIgayMtC6Vgz La3w== X-Gm-Message-State: AA6/9RlxOsfNw/NSKTs7sJDN4OXNsZ+4aVcb1i4rwpGxhPBkNF7g87wxJeGPmRZ70JYg66zdKLQpIF/Swzef7SMy X-Received: by 10.25.35.6 with SMTP id j6mr4440647lfj.147.1476212581740; Tue, 11 Oct 2016 12:03:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.114.77.42 with HTTP; Tue, 11 Oct 2016 12:03:00 -0700 (PDT) In-Reply-To: References: <1476120925-26574-1-git-send-email-jkrishnanjanappa@mvista.com> From: Jagadeesh Krishnanjanappa Date: Wed, 12 Oct 2016 00:33:00 +0530 Message-ID: To: Christopher Larson Cc: OE-core Subject: Re: [PATCH] connman: get the correct network interface name from dmesg during NFS booting X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Oct 2016 19:03:01 -0000 Content-Type: multipart/alternative; boundary=001a113ca7628cb3cb053e9b8627 --001a113ca7628cb3cb053e9b8627 Content-Type: text/plain; charset=UTF-8 On Tue, Oct 11, 2016 at 9:06 PM, Christopher Larson wrote: > > On Tue, Oct 11, 2016 at 5:11 AM, Jagadeesh Krishnanjanappa < > jkrishnanjanappa@mvista.com> wrote: > >> Thanks for reviewing the patch. >> >> >>> I think this is too fragile to land in OE-Core. What happens if a >>> network driver prints "device=eth0"? Or if other kernel messages make >>> the string disappear from dmesg and connman gets restarted later? >>> >> >> True. If device=eth0 gets disappeared/corrupted, then we may have problem. >> >>> >>> FWIW, I'm attaching my current wrapper script for connmand. I don't >>> think it's perfect, but at least it doesn't depend on any init manager >>> and works across restarts. >> >> The wrapper script attached by you, takes care of the missing scenarios. >> Seems to be more complete. >> >>> >>> >> Add these lines to connman's do_install, in case you'd like to test >>> and/or submit it: >>> >>> mv ${D}${sbindir}/connmand ${D}${sbindir}/connmand.real >>> install -m 755 ${WORKDIR}/connmand-nfsroot.in ${D}${sbindir}/connmand >>> sed -e 's,@sbindir@,${sbindir},g' -i ${D}${sbindir}/connmand >>> >> I think it would be good idea to integrate your changes into the already >> existing OE-core's connman script, instead of a calling original connman >> script from the wrapper script. >> > > I threw together https://github.com/openembedded/openembedded- > core/compare/master...kergoth:connman-systemd-nfs last night, > only limited testing. I think using a script in libexecdir is rather > cleaner than wrapping connmand in place, for something like this, > personally. > In the above commit, the last line of connman/connman/start-connman file, should be exec @SBINDIR@/connmand "$@" instead of exec @SBINDIR@/connman "$@" ; as the actual binary file name is connmand. Regards, Jagadeesh > > > -- > Christopher Larson > clarson at kergoth dot com > Founder - BitBake, OpenEmbedded, OpenZaurus > Maintainer - Tslib > Senior Software Engineer, Mentor Graphics > --001a113ca7628cb3cb053e9b8627 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Tue, Oct 11, 2016 at 9:06 PM, Christopher Larson &= lt;clarson@kergoth= .com> wrote:

On T= ue, Oct 11, 2016 at 5:11 AM, Jagadeesh Krishnanjanappa &l= t;jkrishna= njanappa@mvista.com> wrote:
Thanks f= or reviewing the patch.


I think this is too fragile to land in OE-Core. What happens if a network driver prints "device=3Deth0"? Or if other kernel message= s make
the string disappear from dmesg and connman gets restarted later?
=C2=A0
True. If device=3Deth0 gets disappeared= /corrupted, then we may have problem.

FWIW, I'm attaching my current wrapper script for connmand. I don't=
think it's perfect, but at least it doesn't depend on any init mana= ger
and works across restarts.
The wrapper script attac= hed by you, takes care of the missing scenarios. Seems to be more complete.=
= =C2=A0
Add these lines to connman's do_install, in case you'd like to test=
and/or submit it:

mv ${D}${sbindir}/connmand ${D}${sbindir}/connmand.real
install -m 755 ${WORKDIR}/connmand-nfsroot.in ${D}${sbindir}/connmand<= br> sed -e 's,@sbindir@,${sbindir},g' -i ${D}${sbindir}/connmand
I think it would be good idea to integrate your chang= es into the already existing OE-core's connman script, instead of a cal= ling original connman script from the wrapper script.

I threw together=C2=A0https://github.com/openembedded/openembed= ded-core/compare/master...kergoth:connman-systemd-nfs=C2=A0la= st night, only=C2=A0limited testing. I think using a script in libexecdir i= s rather cleaner than wrapping connmand in place, for something like this, = personally.
=C2=A0
In the above commit, = =C2=A0the last line of connman/connman/start-connman file, should be exec @= SBINDIR@/connmand "$@" instead of exec @SBINDIR@/connman "$@= " ; as the actual binary file name is connmand.

Regards,
Jag= adeesh

--
Christopher Larson
clarson at ke= rgoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer = - Tslib
Senior Software Engineer, Mentor Graphics

--001a113ca7628cb3cb053e9b8627--