Allow one to detect and handle the case where no lease could be obtained
authorGlenn L McGrath <bug1@ihug.co.nz>
Mon, 1 Sep 2003 04:08:36 +0000 (04:08 -0000)
committerGlenn L McGrath <bug1@ihug.co.nz>
Mon, 1 Sep 2003 04:08:36 +0000 (04:08 -0000)
via DHCP. (Just add a section "failed" to your script.)
Patch by Steven Scholz

networking/udhcp/dhcpc.c

index 5c8b0d3f1df0604942ef6166743f6cedc29930ba..d18a963a99d9287e2233ad817019e3021612b798 100644 (file)
@@ -297,6 +297,7 @@ int udhcpc_main(int argc, char *argv[])
                                        timeout = now + ((packet_num == 2) ? 4 : 2);
                                        packet_num++;
                                } else {
+                                       run_script(NULL, "leasefail");
                                        if (client_config.background_if_no_lease) {
                                                LOG(LOG_INFO, "No lease, forking to background.");
                                                client_background();