summaryrefslogtreecommitdiff
path: root/packages/busybox/busybox-1.01/dhcpretrytime.patch
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openembedded.org>2005-09-05 13:23:30 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-09-05 13:23:30 +0000
commite56f2f4546ef9c1d50928951129723ef117dacc2 (patch)
treef32e8eb6421166fefcb0819726dd7d250ea6e5f0 /packages/busybox/busybox-1.01/dhcpretrytime.patch
parentaa19cefcfd34862a11a1dc4151f642eb9dd3f8b2 (diff)
added busybox 1.01
- DEFAULT_PREFERENCE = "-1" because it is not tested on all devices - works on my collie with OZ 3.5.4-20050830
Diffstat (limited to 'packages/busybox/busybox-1.01/dhcpretrytime.patch')
-rw-r--r--packages/busybox/busybox-1.01/dhcpretrytime.patch81
1 files changed, 81 insertions, 0 deletions
diff --git a/packages/busybox/busybox-1.01/dhcpretrytime.patch b/packages/busybox/busybox-1.01/dhcpretrytime.patch
new file mode 100644
index 0000000000..e41ea9de55
--- /dev/null
+++ b/packages/busybox/busybox-1.01/dhcpretrytime.patch
@@ -0,0 +1,81 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- busybox-1.01/networking/udhcp/dhcpc.c~dhcpretrytime
++++ busybox-1.01/networking/udhcp/dhcpc.c
+@@ -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;
+
+@@ -91,6 +92,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);
+@@ -208,6 +210,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}
+ };
+@@ -223,7 +226,7 @@
+ /* get options */
+ while (1) {
+ int option_index = 0;
+- c = getopt_long(argc, argv, "c:CfbH:h:i:np:qr:s:v", arg_options, &option_index);
++ c = getopt_long(argc, argv, "c:fbH:h:i:np:qr:s:t:v", arg_options, &option_index);
+ if (c == -1) break;
+
+ switch (c) {
+@@ -274,6 +277,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;
+@@ -353,7 +359,7 @@
+ }
+ /* wait to try again */
+ packet_num = 0;
+- timeout = now + 60;
++ timeout = now + retrytime;
+ }
+ break;
+ case RENEW_REQUESTED:
+--- busybox-1.01/networking/ifupdown.c~dhcpretrytime
++++ busybox-1.01/networking/ifupdown.c
+@@ -541,7 +541,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));
+@@ -561,8 +561,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")) {