summaryrefslogtreecommitdiff
path: root/recipes/busybox/busybox-1.3.1/dhcpretrytime.patch
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/busybox/busybox-1.3.1/dhcpretrytime.patch
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/busybox/busybox-1.3.1/dhcpretrytime.patch')
-rw-r--r--recipes/busybox/busybox-1.3.1/dhcpretrytime.patch85
1 files changed, 85 insertions, 0 deletions
diff --git a/recipes/busybox/busybox-1.3.1/dhcpretrytime.patch b/recipes/busybox/busybox-1.3.1/dhcpretrytime.patch
new file mode 100644
index 0000000000..893e346acf
--- /dev/null
+++ b/recipes/busybox/busybox-1.3.1/dhcpretrytime.patch
@@ -0,0 +1,85 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+Index: busybox-1.1.0/networking/udhcp/dhcpc.c
+===================================================================
+--- busybox-1.1.0.orig/networking/udhcp/dhcpc.c 2006-03-14 17:19:31.000000000 +0100
++++ busybox-1.1.0/networking/udhcp/dhcpc.c 2006-03-14 17:20:45.000000000 +0100
+@@ -48,6 +48,7 @@
+ static unsigned long requested_ip; /* = 0 */
+ static unsigned long server_addr;
+ static unsigned long timeout;
++static unsigned long retrytime = 60;
+ static int packet_num; /* = 0 */
+ static int fd = -1;
+
+@@ -95,6 +96,7 @@
+ " -r, --request=IP IP address to request (default: none)\n"
+ " -s, --script=file Run file at dhcp events (default:\n"
+ " " DEFAULT_SCRIPT ")\n"
++" -t, --retrytime time to retry DHCP request (default 60s)\n")
+ " -v, --version Display version\n"
+ );
+ exit(0);
+@@ -214,6 +216,7 @@
+ {"quit", no_argument, 0, 'q'},
+ {"request", required_argument, 0, 'r'},
+ {"script", required_argument, 0, 's'},
++ {"retrytime", required_argument, 0, 't'},
+ {"version", no_argument, 0, 'v'},
+ {0, 0, 0, 0}
+ };
+@@ -229,7 +232,7 @@
+ /* get options */
+ while (1) {
+ int option_index = 0;
+- c = getopt_long(argc, argv, "c:CV:fbH:h:F:i:np:qr:s:v", arg_options, &option_index);
++ c = getopt_long(argc, argv, "c:CV:fbH:h:F:i:np:qr:s:t:v", arg_options, &option_index);
+ if (c == -1) break;
+
+ switch (c) {
+@@ -305,6 +308,9 @@
+ case 's':
+ client_config.script = optarg;
+ break;
++ case 't':
++ retrytime = atol(optarg);
++ break;
+ case 'v':
+ printf("udhcpcd, version %s\n\n", VERSION);
+ return 0;
+@@ -394,7 +400,7 @@
+ }
+ /* wait to try again */
+ packet_num = 0;
+- timeout = now + 60;
++ timeout = now + retrytime;
+ }
+ break;
+ case RENEW_REQUESTED:
+Index: busybox-1.1.0/networking/ifupdown.c
+===================================================================
+--- busybox-1.1.0.orig/networking/ifupdown.c 2006-01-11 06:43:51.000000000 +0100
++++ busybox-1.1.0/networking/ifupdown.c 2006-03-14 17:19:41.000000000 +0100
+@@ -506,7 +506,7 @@
+ static int dhcp_up(struct interface_defn_t *ifd, execfn *exec)
+ {
+ if (execable("/sbin/udhcpc")) {
+- return( execute("udhcpc -n -p /var/run/udhcpc.%iface%.pid -i "
++ return( execute("udhcpc -b -p /var/run/udhcpc.%iface%.pid -i "
+ "%iface% [[-H %hostname%]] [[-c %clientid%]]", ifd, exec));
+ } else if (execable("/sbin/pump")) {
+ return( execute("pump -i %iface% [[-h %hostname%]] [[-l %leasehours%]]", ifd, exec));
+@@ -526,8 +526,8 @@
+ /* SIGUSR2 forces udhcpc to release the current lease and go inactive,
+ * and SIGTERM causes udhcpc to exit. Signals are queued and processed
+ * sequentially so we don't need to sleep */
+- result = execute("kill -USR2 `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec);
+- result += execute("kill -TERM `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec);
++ result = execute("kill -USR2 `cat /var/run/udhcpc.%iface%.pid 2>/dev/null` 2>/dev/null", ifd, exec);
++ result += execute("kill -TERM `cat /var/run/udhcpc.%iface%.pid 2>/dev/null` 2>/dev/null", ifd, exec);
+ } else if (execable("/sbin/pump")) {
+ result = execute("pump -i %iface% -k", ifd, exec);
+ } else if (execable("/sbin/dhclient")) {