All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] init-ifupdown: Fix getting DNS if rootfs is network mount
@ 2015-10-09 11:33 Jacob Stiffler
  2015-10-09 11:36 ` Denys Dmytriyenko
  0 siblings, 1 reply; 5+ messages in thread
From: Jacob Stiffler @ 2015-10-09 11:33 UTC (permalink / raw)
  To: meta-arago

* Previously, if the rootfs was a network mount, then no network
  configuration was done
* This included the DHCP request to obtain the DNS addresses
* If the rootfs is a network mount, then run "udhcpc" to get the DNS
  addresses

Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
---
 meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init      | 5 ++++-
 .../recipes-core/init-ifupdown/init-ifupdown_%.bbappend              | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init b/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init
index 86aff88..235652d 100644
--- a/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init
+++ b/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init
@@ -20,12 +20,15 @@ case "$1" in
         if sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts | 
           grep -q "^/ nfs$"; then
             echo "NOT configuring network interfaces: / is an NFS mount"
+            udhcpc
         elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |  
           grep -q "^/ smbfs$"; then
             echo "NOT configuring network interfaces: / is an SMB mount"
-	elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts | 
+            udhcpc
+        elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts | 
           grep -qE '^(nfs|smbfs|ncp|coda)$'; then
             echo "NOT configuring network interfaces: network shares still mounted."
+            udhcpc
         else
             echo -n "Configuring network interfaces... "
             ifup -a
diff --git a/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown_%.bbappend b/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown_%.bbappend
index c0ab069..997adf2 100644
--- a/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown_%.bbappend
+++ b/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown_%.bbappend
@@ -1,4 +1,4 @@
 # look for files in this layer first
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-PR_append = "-arago0"
+PR_append = "-arago1"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] init-ifupdown: Fix getting DNS if rootfs is network mount
  2015-10-09 11:33 [PATCH] init-ifupdown: Fix getting DNS if rootfs is network mount Jacob Stiffler
@ 2015-10-09 11:36 ` Denys Dmytriyenko
  2015-10-09 11:37   ` Jacob Stiffler
  0 siblings, 1 reply; 5+ messages in thread
From: Denys Dmytriyenko @ 2015-10-09 11:36 UTC (permalink / raw)
  To: Jacob Stiffler; +Cc: meta-arago

NAK, this is wrong.

On Fri, Oct 09, 2015 at 07:33:03AM -0400, Jacob Stiffler wrote:
> * Previously, if the rootfs was a network mount, then no network
>   configuration was done
> * This included the DHCP request to obtain the DNS addresses
> * If the rootfs is a network mount, then run "udhcpc" to get the DNS
>   addresses
> 
> Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
> ---
>  meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init      | 5 ++++-
>  .../recipes-core/init-ifupdown/init-ifupdown_%.bbappend              | 2 +-
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init b/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init
> index 86aff88..235652d 100644
> --- a/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init
> +++ b/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init
> @@ -20,12 +20,15 @@ case "$1" in
>          if sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts | 
>            grep -q "^/ nfs$"; then
>              echo "NOT configuring network interfaces: / is an NFS mount"
> +            udhcpc
>          elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |  
>            grep -q "^/ smbfs$"; then
>              echo "NOT configuring network interfaces: / is an SMB mount"
> -	elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts | 
> +            udhcpc
> +        elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts | 
>            grep -qE '^(nfs|smbfs|ncp|coda)$'; then
>              echo "NOT configuring network interfaces: network shares still mounted."
> +            udhcpc
>          else
>              echo -n "Configuring network interfaces... "
>              ifup -a
> diff --git a/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown_%.bbappend b/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown_%.bbappend
> index c0ab069..997adf2 100644
> --- a/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown_%.bbappend
> +++ b/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown_%.bbappend
> @@ -1,4 +1,4 @@
>  # look for files in this layer first
>  FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
>  
> -PR_append = "-arago0"
> +PR_append = "-arago1"
> -- 
> 1.9.1
> 
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] init-ifupdown: Fix getting DNS if rootfs is network mount
  2015-10-09 11:36 ` Denys Dmytriyenko
@ 2015-10-09 11:37   ` Jacob Stiffler
  2015-10-09 11:49     ` Denys Dmytriyenko
  0 siblings, 1 reply; 5+ messages in thread
From: Jacob Stiffler @ 2015-10-09 11:37 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: meta-arago



On 10/9/2015 7:36 AM, Denys Dmytriyenko wrote:
> NAK, this is wrong.

What is wrong about it? Is there another way to get the DNS addresses?

> On Fri, Oct 09, 2015 at 07:33:03AM -0400, Jacob Stiffler wrote:
>> * Previously, if the rootfs was a network mount, then no network
>>    configuration was done
>> * This included the DHCP request to obtain the DNS addresses
>> * If the rootfs is a network mount, then run "udhcpc" to get the DNS
>>    addresses
>>
>> Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
>> ---
>>   meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init      | 5 ++++-
>>   .../recipes-core/init-ifupdown/init-ifupdown_%.bbappend              | 2 +-
>>   2 files changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init b/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init
>> index 86aff88..235652d 100644
>> --- a/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init
>> +++ b/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init
>> @@ -20,12 +20,15 @@ case "$1" in
>>           if sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |
>>             grep -q "^/ nfs$"; then
>>               echo "NOT configuring network interfaces: / is an NFS mount"
>> +            udhcpc
>>           elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |
>>             grep -q "^/ smbfs$"; then
>>               echo "NOT configuring network interfaces: / is an SMB mount"
>> -	elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts |
>> +            udhcpc
>> +        elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts |
>>             grep -qE '^(nfs|smbfs|ncp|coda)$'; then
>>               echo "NOT configuring network interfaces: network shares still mounted."
>> +            udhcpc
>>           else
>>               echo -n "Configuring network interfaces... "
>>               ifup -a
>> diff --git a/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown_%.bbappend b/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown_%.bbappend
>> index c0ab069..997adf2 100644
>> --- a/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown_%.bbappend
>> +++ b/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown_%.bbappend
>> @@ -1,4 +1,4 @@
>>   # look for files in this layer first
>>   FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
>>   
>> -PR_append = "-arago0"
>> +PR_append = "-arago1"
>> -- 
>> 1.9.1
>>
>> _______________________________________________
>> meta-arago mailing list
>> meta-arago@arago-project.org
>> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
>>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] init-ifupdown: Fix getting DNS if rootfs is network mount
  2015-10-09 11:37   ` Jacob Stiffler
@ 2015-10-09 11:49     ` Denys Dmytriyenko
  2015-10-12 15:17       ` Denys Dmytriyenko
  0 siblings, 1 reply; 5+ messages in thread
From: Denys Dmytriyenko @ 2015-10-09 11:49 UTC (permalink / raw)
  To: Jacob Stiffler; +Cc: meta-arago

On Fri, Oct 09, 2015 at 07:37:35AM -0400, Jacob Stiffler wrote:
> 
> 
> On 10/9/2015 7:36 AM, Denys Dmytriyenko wrote:
> >NAK, this is wrong.
> 
> What is wrong about it? Is there another way to get the DNS addresses?

You assume dhcp unconditionally w/o consulting /etc/interfaces file from 
init-ifupdown


> >On Fri, Oct 09, 2015 at 07:33:03AM -0400, Jacob Stiffler wrote:
> >>* Previously, if the rootfs was a network mount, then no network
> >>   configuration was done
> >>* This included the DHCP request to obtain the DNS addresses
> >>* If the rootfs is a network mount, then run "udhcpc" to get the DNS
> >>   addresses
> >>
> >>Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
> >>---
> >>  meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init      | 5 ++++-
> >>  .../recipes-core/init-ifupdown/init-ifupdown_%.bbappend              | 2 +-
> >>  2 files changed, 5 insertions(+), 2 deletions(-)
> >>
> >>diff --git a/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init b/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init
> >>index 86aff88..235652d 100644
> >>--- a/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init
> >>+++ b/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init
> >>@@ -20,12 +20,15 @@ case "$1" in
> >>          if sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |
> >>            grep -q "^/ nfs$"; then
> >>              echo "NOT configuring network interfaces: / is an NFS mount"
> >>+            udhcpc
> >>          elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |
> >>            grep -q "^/ smbfs$"; then
> >>              echo "NOT configuring network interfaces: / is an SMB mount"
> >>-	elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts |
> >>+            udhcpc
> >>+        elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts |
> >>            grep -qE '^(nfs|smbfs|ncp|coda)$'; then
> >>              echo "NOT configuring network interfaces: network shares still mounted."
> >>+            udhcpc
> >>          else
> >>              echo -n "Configuring network interfaces... "
> >>              ifup -a
> >>diff --git a/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown_%.bbappend b/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown_%.bbappend
> >>index c0ab069..997adf2 100644
> >>--- a/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown_%.bbappend
> >>+++ b/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown_%.bbappend
> >>@@ -1,4 +1,4 @@
> >>  # look for files in this layer first
> >>  FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
> >>-PR_append = "-arago0"
> >>+PR_append = "-arago1"
> >>-- 
> >>1.9.1
> >>
> >>_______________________________________________
> >>meta-arago mailing list
> >>meta-arago@arago-project.org
> >>http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
> >>
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] init-ifupdown: Fix getting DNS if rootfs is network mount
  2015-10-09 11:49     ` Denys Dmytriyenko
@ 2015-10-12 15:17       ` Denys Dmytriyenko
  0 siblings, 0 replies; 5+ messages in thread
From: Denys Dmytriyenko @ 2015-10-12 15:17 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: meta-arago

On Fri, Oct 09, 2015 at 07:49:33AM -0400, Denys Dmytriyenko wrote:
> On Fri, Oct 09, 2015 at 07:37:35AM -0400, Jacob Stiffler wrote:
> > 
> > 
> > On 10/9/2015 7:36 AM, Denys Dmytriyenko wrote:
> > >NAK, this is wrong.
> > 
> > What is wrong about it? Is there another way to get the DNS addresses?
> 
> You assume dhcp unconditionally w/o consulting /etc/interfaces file from 
> init-ifupdown

Moreover, when rootfs is mounted over NFS, the kernel is responsible for 
assigning the IP address early on, but it can be either dynamic or static, so 
again, defaulting to dhcp here is not entirely correct.


> > >On Fri, Oct 09, 2015 at 07:33:03AM -0400, Jacob Stiffler wrote:
> > >>* Previously, if the rootfs was a network mount, then no network
> > >>   configuration was done
> > >>* This included the DHCP request to obtain the DNS addresses
> > >>* If the rootfs is a network mount, then run "udhcpc" to get the DNS
> > >>   addresses
> > >>
> > >>Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
> > >>---
> > >>  meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init      | 5 ++++-
> > >>  .../recipes-core/init-ifupdown/init-ifupdown_%.bbappend              | 2 +-
> > >>  2 files changed, 5 insertions(+), 2 deletions(-)
> > >>
> > >>diff --git a/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init b/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init
> > >>index 86aff88..235652d 100644
> > >>--- a/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init
> > >>+++ b/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown/init
> > >>@@ -20,12 +20,15 @@ case "$1" in
> > >>          if sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |
> > >>            grep -q "^/ nfs$"; then
> > >>              echo "NOT configuring network interfaces: / is an NFS mount"
> > >>+            udhcpc
> > >>          elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |
> > >>            grep -q "^/ smbfs$"; then
> > >>              echo "NOT configuring network interfaces: / is an SMB mount"
> > >>-	elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts |
> > >>+            udhcpc
> > >>+        elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts |
> > >>            grep -qE '^(nfs|smbfs|ncp|coda)$'; then
> > >>              echo "NOT configuring network interfaces: network shares still mounted."
> > >>+            udhcpc
> > >>          else
> > >>              echo -n "Configuring network interfaces... "
> > >>              ifup -a
> > >>diff --git a/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown_%.bbappend b/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown_%.bbappend
> > >>index c0ab069..997adf2 100644
> > >>--- a/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown_%.bbappend
> > >>+++ b/meta-arago-distro/recipes-core/init-ifupdown/init-ifupdown_%.bbappend
> > >>@@ -1,4 +1,4 @@
> > >>  # look for files in this layer first
> > >>  FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
> > >>-PR_append = "-arago0"
> > >>+PR_append = "-arago1"
> > >>-- 
> > >>1.9.1
> > >>
> > >>_______________________________________________
> > >>meta-arago mailing list
> > >>meta-arago@arago-project.org
> > >>http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
> > >>
> > 
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-12 15:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-09 11:33 [PATCH] init-ifupdown: Fix getting DNS if rootfs is network mount Jacob Stiffler
2015-10-09 11:36 ` Denys Dmytriyenko
2015-10-09 11:37   ` Jacob Stiffler
2015-10-09 11:49     ` Denys Dmytriyenko
2015-10-12 15:17       ` Denys Dmytriyenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.