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
This commit is contained in:
parent
c2942f0904
commit
d9461f887e
@ -297,6 +297,7 @@ int udhcpc_main(int argc, char *argv[])
|
|||||||
timeout = now + ((packet_num == 2) ? 4 : 2);
|
timeout = now + ((packet_num == 2) ? 4 : 2);
|
||||||
packet_num++;
|
packet_num++;
|
||||||
} else {
|
} else {
|
||||||
|
run_script(NULL, "leasefail");
|
||||||
if (client_config.background_if_no_lease) {
|
if (client_config.background_if_no_lease) {
|
||||||
LOG(LOG_INFO, "No lease, forking to background.");
|
LOG(LOG_INFO, "No lease, forking to background.");
|
||||||
client_background();
|
client_background();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user