summaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.c
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2003-09-01 04:08:36 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2003-09-01 04:08:36 +0000
commitd9461f887ee967d3d9e55321b5eee5b88e1dc415 (patch)
tree49bfbe90129b610997418a716d9952ad83f79d15 /networking/udhcp/dhcpc.c
parentc2942f0904edffa58877abf9d1f13c5d91a0ddee (diff)
downloadbusybox-w32-d9461f887ee967d3d9e55321b5eee5b88e1dc415.tar.gz
busybox-w32-d9461f887ee967d3d9e55321b5eee5b88e1dc415.tar.bz2
busybox-w32-d9461f887ee967d3d9e55321b5eee5b88e1dc415.zip
Allow one to detect and handle the case where no lease could be obtained
via DHCP. (Just add a section "failed" to your script.) Patch by Steven Scholz
Diffstat (limited to '')
-rw-r--r--networking/udhcp/dhcpc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 5c8b0d3f1..d18a963a9 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -297,6 +297,7 @@ int udhcpc_main(int argc, char *argv[])
297 timeout = now + ((packet_num == 2) ? 4 : 2); 297 timeout = now + ((packet_num == 2) ? 4 : 2);
298 packet_num++; 298 packet_num++;
299 } else { 299 } else {
300 run_script(NULL, "leasefail");
300 if (client_config.background_if_no_lease) { 301 if (client_config.background_if_no_lease) {
301 LOG(LOG_INFO, "No lease, forking to background."); 302 LOG(LOG_INFO, "No lease, forking to background.");
302 client_background(); 303 client_background();