From: krw Date: Mon, 19 May 2014 10:37:40 +0000 (+0000) Subject: No point in trying to update the -L file on loss of link if no -L has X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f7c5cb4d4dd094fea75c036cbd622b5f698b7443;p=openbsd No point in trying to update the -L file on loss of link if no -L has been specified. Eliminates spurious "Couldn't write ''" log messages. Spotted while looking into Roman Gorelov's logs on another problem. --- diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 250c71b439e..9699fba64a7 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.307 2014/05/18 15:17:50 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.308 2014/05/19 10:37:40 krw Exp $ */ /* * Copyright 2004 Henning Brauer @@ -344,7 +344,7 @@ routehandler(void) if (ifi->linkstat) { client->state = S_REBOOTING; state_reboot(); - } else { + } else if (strlen(path_option_db)) { /* Let monitoring programs see link loss. */ write_file(path_option_db, O_WRONLY | O_CREAT | O_TRUNC | O_SYNC |