summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2014-07-08 17:06:48 +0200
committerDaniil Baturin <daniil@baturin.org>2014-07-08 17:06:48 +0200
commitfc216c9e3a3d73d5422038d4d305432b24f84620 (patch)
tree72a765af389d62db86273bbdc656ea6dbfbb4481 /scripts
parentb05ccf040f9ccd4d215794d5b4f03316343529dc (diff)
downloadvyatta-cfg-system-fc216c9e3a3d73d5422038d4d305432b24f84620.tar.gz
vyatta-cfg-system-fc216c9e3a3d73d5422038d4d305432b24f84620.zip
Bug #255: add an option to ignore hosts file in dnsmasq.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dns-forwarding/vyatta-dns-forwarding.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/dns-forwarding/vyatta-dns-forwarding.pl b/scripts/dns-forwarding/vyatta-dns-forwarding.pl
index 5714d293..c2109191 100755
--- a/scripts/dns-forwarding/vyatta-dns-forwarding.pl
+++ b/scripts/dns-forwarding/vyatta-dns-forwarding.pl
@@ -74,6 +74,7 @@ sub dnsforwarding_get_values {
$use_system_nameservers = $config->existsOrig("system");
@use_dhcp_nameservers = $config->returnOrigValues("dhcp");
@domain = $config->listOrigNodes("domain");
+ $ignore_hosts_file = $config->returnOrigValue("ignore-hosts-file");
} else {
@listen_interfaces = $config->returnValues("listen-on");
@@ -82,6 +83,7 @@ sub dnsforwarding_get_values {
$use_system_nameservers = $config->exists("system");
@use_dhcp_nameservers = $config->returnValues("dhcp");
@domain = $config->listNodes("domain");
+ $ignore_hosts_file = $config->returnValue("ignore-hosts-file");
}
if (@listen_interfaces != 0) {
@@ -94,6 +96,10 @@ sub dnsforwarding_get_values {
$output .= "cache-size=$cache_size\n";
}
+ if (defined $ignore_hosts_file) {
+ $output .= "no-hosts\n";
+ }
+
if (@use_nameservers != 0){
$use_dnsmasq_conf = 1;
foreach my $cli_nameserver (@use_nameservers) {