summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authortmarkwalder <tmark@isc.org>2017-06-28 13:25:22 -0400
committertmarkwalder <tmark@isc.org>2017-06-28 13:25:22 -0400
commit5c03ed373d91b116475fbbc00348a7082db6e14c (patch)
tree380a43d09b5a093122c8603aaded68be04831389 /client
parent63ccfbb04553b64ad20dabb22a3055f6410bb890 (diff)
downloadisc-dhcp-5c03ed373d91b116475fbbc00348a7082db6e14c.tar.gz
[master] Added conditional comp flag, CALL_SCRIPT_ON_ONETRY_FAIL
Merges in rt18183a.
Diffstat (limited to 'client')
-rw-r--r--client/dhclient.c12
1 files changed, 8 insertions, 4 deletions
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);
}