connman: fixed init script, so it can run with nfs
PATCH 1/1 connman: fixed init script, so it can run with nfs
From: "Felipe F. Tonello" <[email protected]>
Adding -I to the arguments, connmand will ignore the eth interface, so if you are using nfs it will not be disconnected.
FIXME: it might not work if using more than one eth interface. But it's better than not using connman with nfs at all.
--- meta/recipes-connectivity/connman/connman/connman | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
meta/recipes-connectivity/connman/connman/connman +5 -2
@@ -26,11 +26,14 @@ while read dev mtpt fstype rest; do fi done +ethn=`ifconfig | grep eth | sed -e "s/\(eth[0-9]\)\(.*\)/\1/"` + do_start() { EXTRA_PARAM="" - if test $nfsroot -eq 0 ; then - $DAEMON $EXTRA_PARAM + if test $nfsroot -eq 1 ; then + EXTRA_PARAM="-I $ethn" fi + $DAEMON $EXTRA_PARAM } do_stop() {
Signature · 1 line
1.7.9.5
Hello Felipe,
I have some questions regarding this patch:
1. On which hardware/machine have you tested this patch? (real hardware, qemu machine, etc)
2. In what way is connman affecting nfs? In other words, what is the root cause?
3. Which version of connman are you using?
I am asking these questions because I am working on something somehow related, and I think a more general fix might be needed.
Regards,
Cristian Iorga
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of [email protected]
Sent: Wednesday, January 09, 2013 2:37 AM
To: [email protected]
Cc: Felipe F. Tonello
Subject: [poky] [PATCH] connman: fixed init script, so it can run with nfs
From: "Felipe F. Tonello" <[email protected]>
Adding -I to the arguments, connmand will ignore the eth interface, so if you are using nfs it will not be disconnected.
FIXME: it might not work if using more than one eth interface. But it's better than not using connman with nfs at all.
--- meta/recipes-connectivity/connman/connman/connman | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
meta/recipes-connectivity/connman/connman/connman +5 -2
@@ -26,11 +26,14 @@ while read dev mtpt fstype rest; do fi done +ethn=`ifconfig | grep eth | sed -e "s/\(eth[0-9]\)\(.*\)/\1/"` + do_start() { EXTRA_PARAM="" - if test $nfsroot -eq 0 ; then - $DAEMON $EXTRA_PARAM + if test $nfsroot -eq 1 ; then + EXTRA_PARAM="-I $ethn" fi + $DAEMON $EXTRA_PARAM } do_stop() {
--
1.7.9.5
_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky
Quoted 9 lines · Cristian
Hello Felipe,
I have some questions regarding this patch:
1. On which hardware/machine have you tested this patch? (real hardware, qemu machine, etc)
2. In what way is connman affecting nfs? In other words, what is the root cause?
3. Which version of connman are you using?I am asking these questions because I am working on something somehow related, and I think a more general fix might be needed.
I'd also add that:
a) Patches to this part of the tree need to go to the OE-Core mailing list
b) Unconditionally running the expression is inefficient, it should move inside the if statement as it triggers a number of exec calls. This may sound trivial but that all mount up.
Cheers,
Richard
Hi Richard,
Quoted 9 lines · Richard Purdie
Quoted 8 lines · Cristian
Hello Felipe,
I have some questions regarding this patch:
1. On which hardware/machine have you tested this patch? (real hardware, qemu machine, etc)
2. In what way is connman affecting nfs? In other words, what is the root cause?
3. Which version of connman are you using?
Quoted 5 lines
Quoted 1 line
I am asking these questions because I am working on something somehow related, and I think a more general fix might be needed.
I'd also add that:
a) Patches to this part of the tree need to go to the OE-Core mailing list
Ok.
Quoted 3 lines
b) Unconditionally running the expression is inefficient, it should move inside the if statement as it triggers a number of exec calls. This may sound trivial but that all mount up.
I agree. I will fix that before sending to OE-Core.
Felipe
Richard and Cristian,
Quoted 9 lines · Richard Purdie
Quoted 8 lines · Cristian
Hello Felipe,
I have some questions regarding this patch:
1. On which hardware/machine have you tested this patch? (real hardware, qemu machine, etc)
2. In what way is connman affecting nfs? In other words, what is the root cause?
3. Which version of connman are you using?
Quoted 5 lines
Quoted 1 line
I am asking these questions because I am working on something somehow related, and I think a more general fix might be needed.
I'd also add that:
a) Patches to this part of the tree need to go to the OE-Core mailing list
I saw on openembedded tree that connman recipes are old. They are not the same as in poky.
I'm always confused about this. Where is oe-core that poky and oe share?
Felipe
Quoted 14 lines · Felipe Ferreri Tonello
Richard and Cristian,
Quoted 11 lines · Richard Purdie
Quoted 9 lines · Cristian
Hello Felipe,
I have some questions regarding this patch:
1. On which hardware/machine have you tested this patch? (real hardware, qemu machine, etc)
2. In what way is connman affecting nfs? In other words, what is the root cause?
3. Which version of connman are you using?I am asking these questions because I am working on something somehow related, and I think a more general fix might be needed.
Quoted 8 lines
Quoted 3 lines
I'd also add that:
a) Patches to this part of the tree need to go to the OE-Core mailing list
I saw on openembedded tree that connman recipes are old. They are not the same as in poky.
I'm always confused about this. Where is oe-core that poky and oe share?
These two repositories should be in sync in terms of file level content of the meta directory:
http://cgit.openembedded.org/openembedded-core/log/
http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/
Were you looking at openembedded or openembedded-core?
Cheers,
Richard
Hi Richard,
Quoted 24 lines · Richard Purdie
Quoted 14 lines · Felipe Ferreri Tonello
Richard and Cristian,
Quoted 11 lines · Richard Purdie
Quoted 9 lines · Cristian
Hello Felipe,
I have some questions regarding this patch:
1. On which hardware/machine have you tested this patch? (real hardware, qemu machine, etc)
2. In what way is connman affecting nfs? In other words, what is the root cause?
3. Which version of connman are you using?I am asking these questions because I am working on something somehow related, and I think a more general fix might be needed.
Quoted 8 lines
Quoted 3 lines
I'd also add that:
a) Patches to this part of the tree need to go to the OE-Core mailing list
I saw on openembedded tree that connman recipes are old. They are not the same as in poky.
I'm always confused about this. Where is oe-core that poky and oe share?
Quoted 8 lines
These two repositories should be in sync in terms of file level content of the meta directory:
http://cgit.openembedded.org/openembedded-core/log/
http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/
Were you looking at openembedded or openembedded-core?
I was looking into openembedded, now I got it.
btw, What's the difference between them? openembedded tree is the meta-oe? and openembedded-core ie oe-core?
Thanks,
Felipe
Quoted 32 lines · Felipe Ferreri Tonello
Hi Richard,
Quoted 29 lines · Richard Purdie
Quoted 14 lines · Felipe Ferreri Tonello
Richard and Cristian,
Quoted 11 lines · Richard Purdie
Quoted 9 lines · Cristian
Hello Felipe,
I have some questions regarding this patch:
1. On which hardware/machine have you tested this patch? (real hardware, qemu machine, etc)
2. In what way is connman affecting nfs? In other words, what is the root cause?
3. Which version of connman are you using?I am asking these questions because I am working on something somehow related, and I think a more general fix might be needed.
Quoted 8 lines
Quoted 3 lines
I'd also add that:
a) Patches to this part of the tree need to go to the OE-Core mailing list
I saw on openembedded tree that connman recipes are old. They are not the same as in poky.
I'm always confused about this. Where is oe-core that poky and oe share?
These two repositories should be in sync in terms of file level content of the meta directory:
Quoted 8 lines
Quoted 3 lines
http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/
Were you looking at openembedded or openembedded-core?
I was looking into openembedded, now I got it.
btw, What's the difference between them? openembedded tree is the meta-oe? and openembedded-core ie oe-core?
openembedded is OE-Classic, i.e. from before it got split into various pieces such as oe-core and meta-oe.
Cheers,
Richard
Hi Iorga,
Quoted 5 lines · Cristian
Hello Felipe,
I have some questions regarding this patch:
1. On which hardware/machine have you tested this patch? (real hardware, qemu machine, etc)
Real hardware.
Quoted 1 line
2. In what way is connman affecting nfs? In other words, what is the root cause?
When connman tried to take ownership of eth, it crashes the nfs, that is hosting rootfs for instance, connection.
Quoted 1 line
3. Which version of connman are you using?
I'm using 1.9 but I tested this patch on 1.6 as well.
Quoted 2 lines
I am asking these questions because I am working on something somehow related, and I think a more general fix might be needed.
I agree, this is not a generic patch. But it works on most of the times. Also I think it's better then just disabling ConnMan with nfs.
Felipe
Hello Felipe,
My first name is Cristian.
I have reviewed your patch and it does look OK in regard to functionality.
Regards,
Cristian
-----Original Message-----
From: Felipe Ferreri Tonello [mailto:[email protected]]
Sent: Wednesday, January 09, 2013 8:15 PM
To: Iorga, Cristian
Cc: [email protected]; Felipe F. Tonello
Subject: Re: [poky] [PATCH] connman: fixed init script, so it can run with nfs
Hi Iorga,
Quoted 7 lines · Cristian
Hello Felipe,
I have some questions regarding this patch:
1. On which hardware/machine have you tested this patch? (real hardware, qemu machine, etc) Real hardware.
2. In what way is connman affecting nfs? In other words, what is the root cause?
When connman tried to take ownership of eth, it crashes the nfs, that is hosting rootfs for instance, connection.
Quoted 1 line
3. Which version of connman are you using?
I'm using 1.9 but I tested this patch on 1.6 as well.
Quoted 2 lines
I am asking these questions because I am working on something somehow related, and I think a more general fix might be needed.
I agree, this is not a generic patch. But it works on most of the times. Also I think it's better then just disabling ConnMan with nfs.
Felipe