From f4d09f5280f576afbd8ed522d6001fc11ab9ddb0 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Tue, 18 Sep 2012 18:27:56 +0000 Subject: Once resolv.conf.saved has been copied back as resolv.conf, delete it so it isn't copied again the next time a dhclient goes away. Do the resolv.conf.saved restore for v6 as well since v6 goes through the trouble to create resolv.conf.saved. ok beck@ --- sbin/dhclient/dhclient-script | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sbin') diff --git a/sbin/dhclient/dhclient-script b/sbin/dhclient/dhclient-script index 05d4638f68e..3298b1d3095 100644 --- a/sbin/dhclient/dhclient-script +++ b/sbin/dhclient/dhclient-script @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: dhclient-script,v 1.22 2011/04/09 19:53:00 krw Exp $ +# $OpenBSD: dhclient-script,v 1.23 2012/09/18 18:27:55 krw Exp $ # # Copyright (c) 2003 Kenneth R Westerback # @@ -220,6 +220,7 @@ EXPIRE|FAIL) fi if [ -f /etc/resolv.conf.save ]; then cat /etc/resolv.conf.save > /etc/resolv.conf + rm -f /etc/resolv.conf.save fi ;; @@ -227,6 +228,10 @@ EXPIRE6|RELEASE6|STOP6) if [ -n "$old_ip6_address" ]; then ip6_delete_old_address fi + if [ -f /etc/resolv.conf.save ]; then + cat /etc/resolv.conf.save > /etc/resolv.conf + rm -f /etc/resolv.conf.save + fi ;; TIMEOUT) -- cgit v1.2.3