From d9461f887ee967d3d9e55321b5eee5b88e1dc415 Mon Sep 17 00:00:00 2001 From: Glenn L McGrath Date: Mon, 1 Sep 2003 04:08:36 +0000 Subject: [PATCH] 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 --- networking/udhcp/dhcpc.c | 1 + 1 file changed, 1 insertion(+) 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[]) 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(); -- 2.25.1