diff options
-rw-r--r-- | scripts/dns-forwarding/vyatta-dns-forwarding.pl | 6 | ||||
-rwxr-xr-x | scripts/system/vyatta_update_resolv.pl | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/scripts/dns-forwarding/vyatta-dns-forwarding.pl b/scripts/dns-forwarding/vyatta-dns-forwarding.pl index 8639a010..73a4bbe4 100644 --- a/scripts/dns-forwarding/vyatta-dns-forwarding.pl +++ b/scripts/dns-forwarding/vyatta-dns-forwarding.pl @@ -96,7 +96,7 @@ sub dnsforwarding_get_values { if (@use_nameservers != 0){ $use_dnsmasq_conf = 1; foreach my $cli_nameserver (@use_nameservers) { - $output .= "server=$cli_nameserver\n"; + $output .= "server=$cli_nameserver\t# statically configured\n"; } } @@ -113,7 +113,7 @@ sub dnsforwarding_get_values { } if (@system_nameservers > 0) { foreach my $system_nameserver (@system_nameservers) { - $output .= "server=$system_nameserver\n"; + $output .= "server=$system_nameserver\t# system\n"; } } } @@ -128,7 +128,7 @@ sub dnsforwarding_get_values { my @nameserver = split(/ /, $each_nameserver, 2); my $ns = $nameserver[1]; chomp $ns; - $output .= "server=$ns\n"; + $output .= "server=$ns\t# dhcp $interface\n"; } } } diff --git a/scripts/system/vyatta_update_resolv.pl b/scripts/system/vyatta_update_resolv.pl index 054e8ee9..8f0e9ead 100755 --- a/scripts/system/vyatta_update_resolv.pl +++ b/scripts/system/vyatta_update_resolv.pl @@ -78,10 +78,10 @@ if (!defined($domain_name)) { if ($#dhcp_interfaces_resolv_files >= 0) { for my $each_file (@dhcp_interfaces_resolv_files) { chomp $each_file; - my $find_search = `grep search /etc/$each_file 2> /dev/null | wc -l`; + my $find_search = `grep "^search" /etc/$each_file 2> /dev/null | wc -l`; if ($find_search == 1) { - my $search_string = `grep search /etc/$each_file`; - my @dhcp_domains = split(/ /, $search_string, 2); + my $search_string = `grep "^search" /etc/$each_file`; + my @dhcp_domains = split(/\s+/, $search_string, 2); my $dhcp_domain = $dhcp_domains[1]; chomp $dhcp_domain; $doms .= ' ' . $dhcp_domain; |