Denis & all,
I'd like to make a few more of udhcpcd's command line options
available to ifupdown via the /etc/network/interfaces file.
For instance, the attached patch allows access to the
'-t <num_retries>' option by using the following setup
in /etc/network/interfaces:
auto eth0
iface eth0 inet dhcp
retries 10
Please consider applying, if you agree.
Thanks,
Gabriel
diff -NarU5 busybox-svn-21473.orig/networking/ifupdown.c
busybox-svn-21473/networking/ifupdown.c
--- busybox-svn-21473.orig/networking/ifupdown.c 2008-03-24
15:07:47.000000000 -0400
+++ busybox-svn-21473/networking/ifupdown.c 2008-03-24 16:02:04.000000000
-0400
@@ -474,11 +474,11 @@
{ "pump",
"pump -i %iface%[[ -h %hostname%]][[ -l %leasehours%]]",
"pump -i %iface% -k",
},
{ "udhcpc",
- "udhcpc -R -n -p /var/run/udhcpc.%iface%.pid -i %iface%[[ -H
%hostname%]][[ -c %clientid%]][[ -s %script%]]",
+ "udhcpc -R -n -p /var/run/udhcpc.%iface%.pid -i %iface%[[ -H
%hostname%]][[ -c %clientid%]][[ -s %script%]][[ -t %retries%]]",
"kill `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null",
},
};
#endif /* ENABLE_FEATURE_IFUPDOWN_EXTERNAL_DHCPC */
@@ -505,11 +505,11 @@
/* ip doesn't up iface when it configures it (unlike ifconfig) */
if (!execute("ip link set %iface% up", ifd, exec))
return 0;
#endif
return execute("udhcpc -R -n -p /var/run/udhcpc.%iface%.pid "
- "-i %iface%[[ -H %hostname%]][[ -c %clientid%]][[ -s
%script%]]",
+ "-i %iface%[[ -H %hostname%]][[ -c %clientid%]][[ -s
%script%]][[ -t %retries%]]",
ifd, exec);
}
#else
static int dhcp_up(struct interface_defn_t *ifd ATTRIBUTE_UNUSED,
execfn *exec ATTRIBUTE_UNUSED)
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox