All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] busybox-1.11.3/busybox-1.13.2: enable backgrounding for udhcpc
@ 2010-06-11  8:54 Steffen Sledz
  2010-06-11 12:38 ` Steffen Sledz
  2010-06-14 15:00 ` Henri Bragge
  0 siblings, 2 replies; 11+ messages in thread
From: Steffen Sledz @ 2010-06-11  8:54 UTC (permalink / raw)
  To: openembedded-devel

* The former default behaviour was to exit with failure if lease is not
  immediately obtained. This results in permanent network disconnect if DHCP
  server is (accidentally) not available at boot time. :(

* Since bb 1.14 this is no longer hardcoded and can be configured.

Signed-off-by: Steffen Sledz <sledz@dresearch.de>
---
 .../busybox/busybox-1.11.3/udhcpc-background.patch |   12 ++++++++++++
 .../busybox/busybox-1.13.2/udhcpc-background.patch |   12 ++++++++++++
 recipes/busybox/busybox_1.11.3.bb                  |    1 +
 recipes/busybox/busybox_1.13.2.bb                  |    1 +
 4 files changed, 26 insertions(+), 0 deletions(-)
 create mode 100644 recipes/busybox/busybox-1.11.3/udhcpc-background.patch
 create mode 100644 recipes/busybox/busybox-1.13.2/udhcpc-background.patch

diff --git a/recipes/busybox/busybox-1.11.3/udhcpc-background.patch b/recipes/busybox/busybox-1.11.3/udhcpc-background.patch
new file mode 100644
index 0000000..2cb4ec4
--- /dev/null
+++ b/recipes/busybox/busybox-1.11.3/udhcpc-background.patch
@@ -0,0 +1,12 @@
+diff -Nurd busybox-1.13.2.orig//networking/ifupdown.c busybox-1.13.2/networking/ifupdown.c
+--- busybox-1.13.2.orig//networking/ifupdown.c	2010-06-11 09:37:55.000000000 +0200
++++ busybox-1.13.2/networking/ifupdown.c	2010-06-11 09:38:48.000000000 +0200
+@@ -487,7 +487,7 @@
+ 		"pump -i %iface% -k",
+ 	},
+ 	{ "udhcpc",
+-		"udhcpc -R -n -p /var/run/udhcpc.%iface%.pid -i %iface%[[ -H %hostname%]][[ -c %clientid%]]"
++		"udhcpc -R -b -p /var/run/udhcpc.%iface%.pid -i %iface%[[ -H %hostname%]][[ -c %clientid%]]"
+ 				"[[ -s %script%]][[ %udhcpc_opts%]]",
+ 		"kill `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null",
+ 	},
diff --git a/recipes/busybox/busybox-1.13.2/udhcpc-background.patch b/recipes/busybox/busybox-1.13.2/udhcpc-background.patch
new file mode 100644
index 0000000..2cb4ec4
--- /dev/null
+++ b/recipes/busybox/busybox-1.13.2/udhcpc-background.patch
@@ -0,0 +1,12 @@
+diff -Nurd busybox-1.13.2.orig//networking/ifupdown.c busybox-1.13.2/networking/ifupdown.c
+--- busybox-1.13.2.orig//networking/ifupdown.c	2010-06-11 09:37:55.000000000 +0200
++++ busybox-1.13.2/networking/ifupdown.c	2010-06-11 09:38:48.000000000 +0200
+@@ -487,7 +487,7 @@
+ 		"pump -i %iface% -k",
+ 	},
+ 	{ "udhcpc",
+-		"udhcpc -R -n -p /var/run/udhcpc.%iface%.pid -i %iface%[[ -H %hostname%]][[ -c %clientid%]]"
++		"udhcpc -R -b -p /var/run/udhcpc.%iface%.pid -i %iface%[[ -H %hostname%]][[ -c %clientid%]]"
+ 				"[[ -s %script%]][[ %udhcpc_opts%]]",
+ 		"kill `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null",
+ 	},
diff --git a/recipes/busybox/busybox_1.11.3.bb b/recipes/busybox/busybox_1.11.3.bb
index fa169ef..7ddfd9e 100644
--- a/recipes/busybox/busybox_1.11.3.bb
+++ b/recipes/busybox/busybox_1.11.3.bb
@@ -5,6 +5,7 @@ SRC_URI = "\
   http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
   \
   file://udhcpscript.patch \
+  file://udhcpc-background.patch \
   file://B921600.patch \
   file://fdisk_lineedit_segfault.patch \
   file://iptunnel.patch \
diff --git a/recipes/busybox/busybox_1.13.2.bb b/recipes/busybox/busybox_1.13.2.bb
index 57815f6..2b28c0b 100644
--- a/recipes/busybox/busybox_1.13.2.bb
+++ b/recipes/busybox/busybox_1.13.2.bb
@@ -18,6 +18,7 @@ SRC_URI = "\
   \
   file://udhcpscript.patch \
   file://udhcpc-fix-nfsroot.patch \
+  file://udhcpc-background.patch \
   file://B921600.patch \
   file://get_header_tar.patch \
   file://busybox-appletlib-dependency.patch \
-- 
1.6.4.2




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

* Re: [PATCH] busybox-1.11.3/busybox-1.13.2: enable backgrounding for udhcpc
  2010-06-11  8:54 [PATCH] busybox-1.11.3/busybox-1.13.2: enable backgrounding for udhcpc Steffen Sledz
@ 2010-06-11 12:38 ` Steffen Sledz
  2010-06-14 15:00 ` Henri Bragge
  1 sibling, 0 replies; 11+ messages in thread
From: Steffen Sledz @ 2010-06-11 12:38 UTC (permalink / raw)
  To: openembedded-devel

I'd really like some feedback from distro (angstrom, keilos,
slugos, ???) maintainers because most of the distros use 1.13.2
as their preferred version.

Steffen




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

* Re: [PATCH] busybox-1.11.3/busybox-1.13.2: enable backgrounding for udhcpc
  2010-06-11  8:54 [PATCH] busybox-1.11.3/busybox-1.13.2: enable backgrounding for udhcpc Steffen Sledz
  2010-06-11 12:38 ` Steffen Sledz
@ 2010-06-14 15:00 ` Henri Bragge
  2010-06-14 15:28   ` Steffen Sledz
  1 sibling, 1 reply; 11+ messages in thread
From: Henri Bragge @ 2010-06-14 15:00 UTC (permalink / raw)
  To: openembedded-devel

Steffen Sledz wrote:
> * The former default behaviour was to exit with failure if lease is not
>   immediately obtained. This results in permanent network disconnect if DHCP
>   server is (accidentally) not available at boot time. :(
Did not do the trick for me. I found out that there was another 
definition for udhcpc command in ifupdown.c (at least in busybox 
1.13.2), that still had the -n parameter. I think that is the reason?



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

* Re: [PATCH] busybox-1.11.3/busybox-1.13.2: enable backgrounding for udhcpc
  2010-06-14 15:00 ` Henri Bragge
@ 2010-06-14 15:28   ` Steffen Sledz
  2010-06-14 16:31     ` henri.bragge
  0 siblings, 1 reply; 11+ messages in thread
From: Steffen Sledz @ 2010-06-14 15:28 UTC (permalink / raw)
  To: openembedded-devel

Am 14.06.2010 17:00, Henri Bragge wrote:
>> * The former default behaviour was to exit with failure if lease is not
>>   immediately obtained. This results in permanent network disconnect
>>   if DHCP
>>   server is (accidentally) not available at boot time. :(

> Did not do the trick for me. I found out that there was another
> definition for udhcpc command in ifupdown.c (at least in busybox
> 1.13.2), that still had the -n parameter. I think that is the reason?

Can't find "another definition for udhcpc" in ifupdown.c.

Can you please check your build. Best would be a clean build.

Which distro and which machine you build for?

Steffen




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

* Re: [PATCH] busybox-1.11.3/busybox-1.13.2: enable backgrounding for udhcpc
  2010-06-14 15:28   ` Steffen Sledz
@ 2010-06-14 16:31     ` henri.bragge
  2010-06-15  6:55       ` [PATCH v2] " Steffen Sledz
  0 siblings, 1 reply; 11+ messages in thread
From: henri.bragge @ 2010-06-14 16:31 UTC (permalink / raw)
  To: openembedded-devel

> Am 14.06.2010 17:00, Henri Bragge wrote:
>>> * The former default behaviour was to exit with failure if lease is not
>>>   immediately obtained. This results in permanent network disconnect
>>>   if DHCP
>>>   server is (accidentally) not available at boot time. :(
>
>> Did not do the trick for me. I found out that there was another
>> definition for udhcpc command in ifupdown.c (at least in busybox
>> 1.13.2), that still had the -n parameter. I think that is the reason?
>
> Can't find "another definition for udhcpc" in ifupdown.c.
>
> Can you please check your build. Best would be a clean build.
>
> Which distro and which machine you build for?
>

Line 529 in ifupdown.c, in pristine bb 1.13.2. And it's angstrom
console-image for armv5.




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

* [PATCH v2] busybox-1.11.3/busybox-1.13.2: enable backgrounding for udhcpc
  2010-06-14 16:31     ` henri.bragge
@ 2010-06-15  6:55       ` Steffen Sledz
  2010-06-15  7:43         ` Henri Bragge
  2010-06-15 11:53         ` Steffen Sledz
  0 siblings, 2 replies; 11+ messages in thread
From: Steffen Sledz @ 2010-06-15  6:55 UTC (permalink / raw)
  To: openembedded-devel

* The former default behaviour was to exit with failure if lease is not
  immediately obtained. This results in permanent network disconnect if DHCP
  server is (accidentally) not available at boot time. :(

* Since bb 1.14 this is no longer hardcoded and can be configured.

Signed-off-by: Steffen Sledz <sledz@dresearch.de>
---
 .../busybox/busybox-1.11.3/udhcpc-background.patch |   21 ++++++++++++++++++++
 .../busybox/busybox-1.13.2/udhcpc-background.patch |   21 ++++++++++++++++++++
 recipes/busybox/busybox_1.11.3.bb                  |    1 +
 recipes/busybox/busybox_1.13.2.bb                  |    1 +
 4 files changed, 44 insertions(+), 0 deletions(-)
 create mode 100644 recipes/busybox/busybox-1.11.3/udhcpc-background.patch
 create mode 100644 recipes/busybox/busybox-1.13.2/udhcpc-background.patch

diff --git a/recipes/busybox/busybox-1.11.3/udhcpc-background.patch b/recipes/busybox/busybox-1.11.3/udhcpc-background.patch
new file mode 100644
index 0000000..072ce88
--- /dev/null
+++ b/recipes/busybox/busybox-1.11.3/udhcpc-background.patch
@@ -0,0 +1,21 @@
+diff -Nurd busybox-1.11.3.orig//networking/ifupdown.c busybox-1.11.3/networking/ifupdown.c
+--- busybox-1.11.3.orig//networking/ifupdown.c	2010-06-15 08:45:44.000000000 +0200
++++ busybox-1.11.3/networking/ifupdown.c	2010-06-15 08:46:09.000000000 +0200
+@@ -476,7 +476,7 @@
+ 		"pump -i %iface% -k",
+ 	},
+ 	{ "udhcpc",
+-		"udhcpc -R -n -p /var/run/udhcpc.%iface%.pid -i %iface%[[ -H %hostname%]][[ -c %clientid%]]"
++		"udhcpc -R -b -p /var/run/udhcpc.%iface%.pid -i %iface%[[ -H %hostname%]][[ -c %clientid%]]"
+ 				"[[ -s %script%]][[ %udhcpc_opts%]]",
+ 		"kill `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null",
+ 	},
+@@ -507,7 +507,7 @@
+ 	if (!execute("ip link set %iface% up", ifd, exec))
+ 		return 0;
+ #endif
+-	return execute("udhcpc -R -n -p /var/run/udhcpc.%iface%.pid "
++	return execute("udhcpc -R -b -p /var/run/udhcpc.%iface%.pid "
+ 			"-i %iface%[[ -H %hostname%]][[ -c %clientid%]][[ -s %script%]][[ %udhcpc_opts%]]",
+ 			ifd, exec);
+ }
diff --git a/recipes/busybox/busybox-1.13.2/udhcpc-background.patch b/recipes/busybox/busybox-1.13.2/udhcpc-background.patch
new file mode 100644
index 0000000..792023d
--- /dev/null
+++ b/recipes/busybox/busybox-1.13.2/udhcpc-background.patch
@@ -0,0 +1,21 @@
+diff -Nurd busybox-1.13.2.orig//networking/ifupdown.c busybox-1.13.2/networking/ifupdown.c
+--- busybox-1.13.2.orig//networking/ifupdown.c	2010-06-15 08:37:32.000000000 +0200
++++ busybox-1.13.2/networking/ifupdown.c	2010-06-15 08:38:05.000000000 +0200
+@@ -487,7 +487,7 @@
+ 		"pump -i %iface% -k",
+ 	},
+ 	{ "udhcpc",
+-		"udhcpc -R -n -p /var/run/udhcpc.%iface%.pid -i %iface%[[ -H %hostname%]][[ -c %clientid%]]"
++		"udhcpc -R -b -p /var/run/udhcpc.%iface%.pid -i %iface%[[ -H %hostname%]][[ -c %clientid%]]"
+ 				"[[ -s %script%]][[ %udhcpc_opts%]]",
+ 		"kill `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null",
+ 	},
+@@ -526,7 +526,7 @@
+ 	if (!execute("ifconfig %iface%[[ hw %hwaddress%]] up", ifd, exec))
+ 		return 0;
+ #endif
+-	return execute("udhcpc -R -n -p /var/run/udhcpc.%iface%.pid "
++	return execute("udhcpc -R -b -p /var/run/udhcpc.%iface%.pid "
+ 			"-i %iface%[[ -H %hostname%]][[ -c %clientid%]][[ -s %script%]][[ %udhcpc_opts%]]",
+ 			ifd, exec);
+ }
diff --git a/recipes/busybox/busybox_1.11.3.bb b/recipes/busybox/busybox_1.11.3.bb
index fa169ef..7ddfd9e 100644
--- a/recipes/busybox/busybox_1.11.3.bb
+++ b/recipes/busybox/busybox_1.11.3.bb
@@ -5,6 +5,7 @@ SRC_URI = "\
   http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
   \
   file://udhcpscript.patch \
+  file://udhcpc-background.patch \
   file://B921600.patch \
   file://fdisk_lineedit_segfault.patch \
   file://iptunnel.patch \
diff --git a/recipes/busybox/busybox_1.13.2.bb b/recipes/busybox/busybox_1.13.2.bb
index 57815f6..2b28c0b 100644
--- a/recipes/busybox/busybox_1.13.2.bb
+++ b/recipes/busybox/busybox_1.13.2.bb
@@ -18,6 +18,7 @@ SRC_URI = "\
   \
   file://udhcpscript.patch \
   file://udhcpc-fix-nfsroot.patch \
+  file://udhcpc-background.patch \
   file://B921600.patch \
   file://get_header_tar.patch \
   file://busybox-appletlib-dependency.patch \
-- 
1.6.4.2




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

* Re: [PATCH v2] busybox-1.11.3/busybox-1.13.2: enable backgrounding for udhcpc
  2010-06-15  6:55       ` [PATCH v2] " Steffen Sledz
@ 2010-06-15  7:43         ` Henri Bragge
  2010-06-15 16:01           ` John Faith
  2010-06-15 11:53         ` Steffen Sledz
  1 sibling, 1 reply; 11+ messages in thread
From: Henri Bragge @ 2010-06-15  7:43 UTC (permalink / raw)
  To: openembedded-devel

Steffen Sledz wrote:
> * The former default behaviour was to exit with failure if lease is not
>   immediately obtained. This results in permanent network disconnect if DHCP
>   server is (accidentally) not available at boot time. :(
>
> * Since bb 1.14 this is no longer hardcoded and can be configured.

Works for me. I'm still not sure if -b should be hardcoded (it could be 
passed through udhcpc_opts). On the other hand, if someone does not want 
to leave udhcpc in the background they can just pass -n to it, which 
seems to override -b. So this fix seems fine.



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

* Re: [PATCH v2] busybox-1.11.3/busybox-1.13.2: enable backgrounding for udhcpc
  2010-06-15  6:55       ` [PATCH v2] " Steffen Sledz
  2010-06-15  7:43         ` Henri Bragge
@ 2010-06-15 11:53         ` Steffen Sledz
  2010-06-15 12:49           ` Mike Westerhof
  1 sibling, 1 reply; 11+ messages in thread
From: Steffen Sledz @ 2010-06-15 11:53 UTC (permalink / raw)
  To: openembedded-devel

Am 15.06.2010 08:55, schrieb Steffen Sledz:
> * The former default behaviour was to exit with failure if lease is not
>   immediately obtained. This results in permanent network disconnect if DHCP
>   server is (accidentally) not available at boot time. :(
> 
> * Since bb 1.14 this is no longer hardcoded and can be configured.

Some more ACKs?

Or NAKs (i hope not)?




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

* Re: [PATCH v2] busybox-1.11.3/busybox-1.13.2: enable backgrounding for udhcpc
  2010-06-15 11:53         ` Steffen Sledz
@ 2010-06-15 12:49           ` Mike Westerhof
  0 siblings, 0 replies; 11+ messages in thread
From: Mike Westerhof @ 2010-06-15 12:49 UTC (permalink / raw)
  To: openembedded-devel

Steffen Sledz wrote:
> Am 15.06.2010 08:55, schrieb Steffen Sledz:
>> * The former default behaviour was to exit with failure if lease is not
>>   immediately obtained. This results in permanent network disconnect if DHCP
>>   server is (accidentally) not available at boot time. :(
>>
>> * Since bb 1.14 this is no longer hardcoded and can be configured.
> 
> Some more ACKs?
> 
> Or NAKs (i hope not)?

I shall test with SlugOS, but that's a huge task -- not because of this
change, but because since the sysroot change many weeks ago, we still
have not got SlugOS building in OE again.  With the help of Khem, we're
a lot closer (gcc 4.2.4 builds again), but I still can't generate a
working LE image.

I'll see if I can get a BE image to work well enough today to test this.

-Mike



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

* Re: [PATCH v2] busybox-1.11.3/busybox-1.13.2: enable backgrounding for udhcpc
  2010-06-15  7:43         ` Henri Bragge
@ 2010-06-15 16:01           ` John Faith
  2010-06-15 17:59             ` Sledz, Steffen
  0 siblings, 1 reply; 11+ messages in thread
From: John Faith @ 2010-06-15 16:01 UTC (permalink / raw)
  To: openembedded-devel

Henri Bragge wrote:
> Steffen Sledz wrote:
>   
>> * The former default behaviour was to exit with failure if lease is not
>>   immediately obtained. This results in permanent network disconnect if DHCP
>>   server is (accidentally) not available at boot time. :(
>>
>> * Since bb 1.14 this is no longer hardcoded and can be configured.
>>     
>
> Works for me. I'm still not sure if -b should be hardcoded (it could be 
> passed through udhcpc_opts). On the other hand, if someone does not want 
> to leave udhcpc in the background they can just pass -n to it, which 
> seems to override -b. So this fix seems fine.
>
>   
I'd like to have 3 possible network modes: dhcp, zeroconf, or static IP 
and want to switch between them on-the-fly.  It looks like the non-dhcp 
modes can be done using a script or 2 in /etc/udhcpc.d, so it seems 
having udhcpcd running in the background would facilitate this.  Does 
that sound right?

,
John





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

* Re: [PATCH v2] busybox-1.11.3/busybox-1.13.2: enable backgrounding for udhcpc
  2010-06-15 16:01           ` John Faith
@ 2010-06-15 17:59             ` Sledz, Steffen
  0 siblings, 0 replies; 11+ messages in thread
From: Sledz, Steffen @ 2010-06-15 17:59 UTC (permalink / raw)
  To: openembedded-devel

Am 15.06.2010 18:01, schrieb John Faith:
> I'd like to have 3 possible network modes: dhcp, zeroconf, or static IP
> and want to switch between them on-the-fly.  It looks like the non-dhcp
> modes can be done using a script or 2 in /etc/udhcpc.d, so it seems
> having udhcpcd running in the background would facilitate this.  Does
> that sound right?

That's not part of this patch. This patch just changes the default
behaviour *if using DHCP*.

Steffen


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

end of thread, other threads:[~2010-06-15 18:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-11  8:54 [PATCH] busybox-1.11.3/busybox-1.13.2: enable backgrounding for udhcpc Steffen Sledz
2010-06-11 12:38 ` Steffen Sledz
2010-06-14 15:00 ` Henri Bragge
2010-06-14 15:28   ` Steffen Sledz
2010-06-14 16:31     ` henri.bragge
2010-06-15  6:55       ` [PATCH v2] " Steffen Sledz
2010-06-15  7:43         ` Henri Bragge
2010-06-15 16:01           ` John Faith
2010-06-15 17:59             ` Sledz, Steffen
2010-06-15 11:53         ` Steffen Sledz
2010-06-15 12:49           ` Mike Westerhof

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.