From: Roy Marples Date: Fri, 30 Apr 2010 03:24:06 +0000 (+0000) Subject: Use timeout in test mode as well. X-Git-Tag: v5.2.3~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1973f4c18f6cd1049594c27f2d0876e55f45f9b6;p=thirdparty%2Fdhcpcd.git Use timeout in test mode as well. --- diff --git a/dhcpcd.c b/dhcpcd.c index c3583de3..adb65c4b 100644 --- a/dhcpcd.c +++ b/dhcpcd.c @@ -1878,12 +1878,15 @@ main(int argc, char **argv) { syslog(LOG_WARNING, "no interfaces have a carrier"); daemonise(); - } else if (options & DHCPCD_DAEMONISE && ifo->timeout > 0) { + } else if (ifo->timeout > 0 && + (options & DHCPCD_DAEMONISE || + options & DHCPCD_TEST)) + { if (options & DHCPCD_IPV4LL) options |= DHCPCD_TIMEOUT_IPV4LL; - add_timeout_sec(ifo->timeout, handle_exit_timeout, NULL); + add_timeout_sec(ifo->timeout, handle_exit_timeout, + NULL); } - } free_options(ifo);