diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2012-02-22 10:49:07 -0800 |
---|---|---|
committer | Stephen Hemminger <shemminger@vyatta.com> | 2012-02-22 10:49:07 -0800 |
commit | 0af3058ba9f1bd5c770fa1aa9c48eb4724cef7b3 (patch) | |
tree | f9c8b8e5ff2a251d0ffac4a16a43edcacec8c74f /scripts | |
parent | 7bab6815704ce464a97ebbc29d12d400b443de33 (diff) | |
parent | ad3177fc2fa442a55c6ac50b968c9dfbf060f481 (diff) | |
download | vyatta-op-0af3058ba9f1bd5c770fa1aa9c48eb4724cef7b3.tar.gz vyatta-op-0af3058ba9f1bd5c770fa1aa9c48eb4724cef7b3.zip |
Merge branch 'oxnard' of fiji.vyatta.com:/git/vyatta-op into oxnard
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-op-dns-forwarding.pl | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/scripts/vyatta-op-dns-forwarding.pl b/scripts/vyatta-op-dns-forwarding.pl index dc5fbf1..5f94c15 100755 --- a/scripts/vyatta-op-dns-forwarding.pl +++ b/scripts/vyatta-op-dns-forwarding.pl @@ -188,6 +188,9 @@ sub get_dns_nameservers { $show_nameservers_output .= "-----------------------------------------------\n"; $show_nameservers_output .= " Nameservers configured for DNS forwarding\n"; $show_nameservers_output .= "-----------------------------------------------\n"; + my $show_nameservers_output_dhcp; + my $show_nameservers_output_domain; + my $show_nameservers_output_nameserver; my $line_flag; ## server=/test.com/1.1.1.1 @@ -204,9 +207,9 @@ sub get_dns_nameservers { @domain_tokens = split(/\//, $nameserver); if (!defined($line_flag)) { $line_flag = 1; - $show_nameservers_output .= "\n"; - $show_nameservers_output .= "Domain Overrides\n"; - $show_nameservers_output .= "\n"; + $show_nameservers_output_domain .= "\n"; + $show_nameservers_output_domain .= "Domain Overrides:\n"; + $show_nameservers_output_domain .= "\n"; } } $active_nameservers[$active_nameserver_count] = $nameserver; @@ -214,13 +217,22 @@ sub get_dns_nameservers { my $nameserver_via = $nameserver_array[2]; if (@nameserver_array > 3){ my $dhcp_interface = $nameserver_array[3]; - $show_nameservers_output .= "$nameserver available via '$nameserver_via $dhcp_interface'\n"; + $show_nameservers_output_dhcp .= "$nameserver available via '$nameserver_via $dhcp_interface'\n"; } elsif (@domain_tokens) { - $show_nameservers_output .= "$domain_tokens[1] uses $domain_tokens[2] via '$nameserver_via'\n"; + $show_nameservers_output_domain .= "$domain_tokens[1] uses $domain_tokens[2]\n"; } else { - $show_nameservers_output .= "$nameserver available via '$nameserver_via'\n"; + $show_nameservers_output_nameserver .= "$nameserver available via '$nameserver_via'\n"; } } + if (defined ($show_nameservers_output_nameserver)) { + $show_nameservers_output .= $show_nameservers_output_nameserver; + } + if (defined ($show_nameservers_output_dhcp)) { + $show_nameservers_output .= $show_nameservers_output_dhcp; + } + if (defined ($show_nameservers_output_domain)) { + $show_nameservers_output .= $show_nameservers_output_domain ; + } # then you need to get nameservers from /etc/resolv.conf that are not in dnsmasq.conf to show them as inactive |