From 51fc24c24c8f3e9f893a7df550f755f9fc7d1d76 Mon Sep 17 00:00:00 2001 From: Alex Harpin Date: Tue, 9 Sep 2014 19:43:40 +0100 Subject: vyatta-cfg-system: revert bb71cf5b7b3a48812e28dbefba8c535f9bbf9973 Reverting commit bb71cf5b7b3a48812e28dbefba8c535f9bbf9973 as it breaks the logic in vyatta_update_resolv.pl for removing name servers when called by dhclient-script. As it stands, the commit causes name server entries to be left behind in resolv.conf when a DHCP interface is deleted, resulting in possibly old or invalid entries remaining indefinitely. Bug #307 http://bugzilla.vyos.net/show_bug.cgi?id=307 --- scripts/system/vyatta_update_resolv.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'scripts/system') diff --git a/scripts/system/vyatta_update_resolv.pl b/scripts/system/vyatta_update_resolv.pl index a0151990..6a60278b 100755 --- a/scripts/system/vyatta_update_resolv.pl +++ b/scripts/system/vyatta_update_resolv.pl @@ -130,8 +130,7 @@ if (($dhclient_script == 1) && !($vc->existsOrig('name-server'))) { if ($ns_in_resolvconf == 0) { open (my $rf, '>>', '/etc/resolv.conf') or die "$! error trying to overwrite"; - print $rf "#nameserver\t$ns\t\t#nameserver written by $0\n"; - print $rf "nameserver\t$ns\n"; + print $rf "nameserver\t$ns\t\t#nameserver written by $0\n"; close $rf; $restart_ntp = 1; } -- cgit v1.2.3