summaryrefslogtreecommitdiffstats
path: root/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-09-06 19:41:05 +0000
committerRoy Marples <roy@marples.name>2008-09-06 19:41:05 +0000
commit64c6e1eb18db57252fb4dbdde81f25973beba4ff (patch)
treeef31a1e0e9512cf3cf07bec3a740850470ad5bb7 /dhcpcd.c
parent08aa77766031ce7f5966e81495e87360dce2e1a2 (diff)
downloaddhcpcd-64c6e1eb18db57252fb4dbdde81f25973beba4ff.tar.xz
Check carrier when starting reboot.
Diffstat (limited to 'dhcpcd.c')
-rw-r--r--dhcpcd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/dhcpcd.c b/dhcpcd.c
index 9b952b48..7d6c35a1 100644
--- 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;