summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Harpin <development@landsofshadow.co.uk>2014-09-09 19:43:40 +0100
committerAlex Harpin <development@landsofshadow.co.uk>2014-09-09 19:43:40 +0100
commit51fc24c24c8f3e9f893a7df550f755f9fc7d1d76 (patch)
treef90941d00a489f30ae0ab822c87ed701668bd90d
parentefb549809bbdd011640a5a2bf8c6650fe5e30847 (diff)
downloadvyatta-cfg-system-51fc24c24c8f3e9f893a7df550f755f9fc7d1d76.tar.gz
vyatta-cfg-system-51fc24c24c8f3e9f893a7df550f755f9fc7d1d76.zip
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
-rwxr-xr-xscripts/system/vyatta_update_resolv.pl3
1 files changed, 1 insertions, 2 deletions
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;
}