changeset 981:8a655d895e9a draft

Correctly set the REBOOT reason.
author Roy Marples <roy@marples.name>
date Mon, 15 Sep 2008 15:20:37 +0000
parents 296dfd15784d
children b8b5d9059bb0
files bind.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/bind.c	Mon Sep 15 15:20:09 2008 +0000
+++ b/bind.c	Mon Sep 15 15:20:37 2008 +0000
@@ -108,7 +108,6 @@
 	delete_timeout(handle_exit_timeout, NULL);
 	if (clock_monotonic)
 		get_monotonic(&lease->boundtime);
-	state->state = DHS_BOUND;
 	state->xid = 0;
 	free(state->old);
 	state->old = state->new;
@@ -169,7 +168,9 @@
 				reason = "RENEW";
 			else
 				reason = "REBIND";
-		} else
+		} else if (state->state == DHS_REBOOT)
+			reason = "REBOOT";
+		else
 			reason = "BOUND";
 	}
 	if (options & DHCPCD_TEST) {
@@ -185,6 +186,7 @@
 	}
 	configure(iface, reason);
 	daemonise();
+	state->state = DHS_BOUND;
 	if (ifo->options & DHCPCD_ARP) {
 		state->claims = 0;
 		send_arp_announce(iface);