summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/dns-forwarding/vyatta-dns-forwarding.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/dns-forwarding/vyatta-dns-forwarding.pl b/scripts/dns-forwarding/vyatta-dns-forwarding.pl
index 60f61e16..cfa4ee9b 100644
--- a/scripts/dns-forwarding/vyatta-dns-forwarding.pl
+++ b/scripts/dns-forwarding/vyatta-dns-forwarding.pl
@@ -91,9 +91,11 @@ sub check_nameserver {
sub check_system_nameserver {
- my $num_all_nameservers = `grep nameserver /etc/resolv.conf|wc -l`;
- my $num_dhcp_nameservers = `grep nameserver /etc/resolv.conf| grep vyatta_update_resolv|wc -l`;
- return ($num_all_nameservers - $num_dhcp_nameservers);
+ my $config = new VyattaConfig;
+ $config->setLevel("system");
+ my @system_nameservers = $config->returnValues("name-server");
+ return(@system_nameservers);
+
}
sub check_dhcp_nameserver {