]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Check carrier when starting reboot.
authorRoy Marples <roy@marples.name>
Sat, 6 Sep 2008 19:41:05 +0000 (19:41 +0000)
committerRoy Marples <roy@marples.name>
Sat, 6 Sep 2008 19:41:05 +0000 (19:41 +0000)
dhcpcd.c

index 9b952b48a2d09d7cc99ef94c5b262fd5a4697bcf..7d6c35a11d98706677c72926df04a07aabf1efd2 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -655,6 +655,10 @@ start_reboot(struct interface *iface)
 {
        struct if_options *ifo = iface->state->options;
 
+       if (ifo->options & DHCPCD_LINK && iface->state->carrier == LINK_DOWN) {
+               syslog(LOG_INFO, "%s: waiting for carrier", iface->name);
+               return;
+       }
        syslog(LOG_INFO, "%s: rebinding lease of %s",
               iface->name, inet_ntoa(iface->state->lease.addr));
        iface->state->state = DHS_REBINDING;