From 5c03ed373d91b116475fbbc00348a7082db6e14c Mon Sep 17 00:00:00 2001 From: tmarkwalder Date: Wed, 28 Jun 2017 13:25:22 -0400 Subject: [master] Added conditional comp flag, CALL_SCRIPT_ON_ONETRY_FAIL Merges in rt18183a. --- client/dhclient.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'client/dhclient.c') diff --git a/client/dhclient.c b/client/dhclient.c index d20ef05d..84a86fb3 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -1479,14 +1479,16 @@ void bind_lease (client) destroy_client_lease(client->new); client->new = NULL; if (onetry) { - if (!quiet) + if (!quiet) { log_info("Unable to obtain a lease on first " "try (declined). Exiting."); + } +#if defined (CALL_SCRIPT_ON_ONETRY_FAIL) /* Let's call a script and we're done */ script_init(client, "FAIL", (struct string_list *)0); script_go(client); - +#endif finish(2); } else { state_init(client); @@ -2493,14 +2495,16 @@ void state_panic (cpp) tell the shell script that we failed to allocate an address, and try again later. */ if (onetry) { - if (!quiet) + if (!quiet) { log_info ("Unable to obtain a lease on first try.%s", " Exiting."); + } +#if defined (CALL_SCRIPT_ON_ONETRY_FAIL) /* Let's call a script and we're done */ script_init(client, "FAIL", (struct string_list *)0); script_go(client); - +#endif finish(2); } -- cgit v1.2.1