From: Roy Marples Date: Sat, 11 Jul 2009 20:00:03 +0000 (+0000) Subject: Don't run the script with NAK when testing. X-Git-Tag: v5.0.7~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e996f8767ea2e44b0788e708ba5c27ba3cb5e79e;p=thirdparty%2Fdhcpcd.git Don't run the script with NAK when testing. --- diff --git a/dhcpcd.c b/dhcpcd.c index 6df84b39..232eeeee 100644 --- a/dhcpcd.c +++ b/dhcpcd.c @@ -475,8 +475,10 @@ handle_dhcp(struct interface *iface, struct dhcp_message **dhcpp) } /* We should restart on a NAK */ log_dhcp(LOG_WARNING, "NAK:", iface, dhcp); - drop_config(iface, "NAK"); - unlink(iface->leasefile); + if (!(options & DHCPCD_TEST)) { + drop_config(iface, "NAK"); + unlink(iface->leasefile); + } delete_event(iface->raw_fd); close(iface->raw_fd); iface->raw_fd = -1;