diff options
Diffstat (limited to 'scripts/system/vyatta_update_resolv.pl')
-rwxr-xr-x | scripts/system/vyatta_update_resolv.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/system/vyatta_update_resolv.pl b/scripts/system/vyatta_update_resolv.pl index 921052f0..93e6041d 100755 --- a/scripts/system/vyatta_update_resolv.pl +++ b/scripts/system/vyatta_update_resolv.pl @@ -96,12 +96,12 @@ if (!defined($domain_name)) { my $search = ''; if (length($doms) > 0) { - $search = "search\t\t$doms\t\t#line generated by $0\n"; + $search = "#line generated by $0\nsearch\t\t$doms\n"; } my $domain = ''; if ($domain_name && length($domain_name) > 0) { - $domain = "domain\t\t$domain_name\t\t#line generated by $0\n"; + $domain = "#line generated by $0\ndomain\t\t$domain_name\n"; } # update /etc/resolv.conf with name-servers received from dhcp client, done when this script is called @@ -221,7 +221,7 @@ foreach my $line (@resolv) { if (length($domain) > 0) { print $r $domain; } - } else { + } elsif ($line !~ /^#line generated by\s/) { print $r $line; } } |