From d49c9edf95ecb4a94ad3800c336d081030e764c1 Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Tue, 5 Aug 2008 01:53:32 +0000 Subject: - add ability to set cache-size for DNS forwarding from CLI - restart dnsmasq when /etc/hosts is modified from CLI to re-read added or deleted hosts --- scripts/dns-forwarding/vyatta-dns-forwarding.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'scripts/dns-forwarding') diff --git a/scripts/dns-forwarding/vyatta-dns-forwarding.pl b/scripts/dns-forwarding/vyatta-dns-forwarding.pl index 01111d4a..4eebf6d7 100644 --- a/scripts/dns-forwarding/vyatta-dns-forwarding.pl +++ b/scripts/dns-forwarding/vyatta-dns-forwarding.pl @@ -39,12 +39,12 @@ sub dnsforwarding_init { } sub dnsforwarding_restart { - system("$dnsforwarding_init restart 2&>1 /dev/null"); + system("$dnsforwarding_init restart >&/dev/null"); print "Setting up DNS forwarding.\n"; } sub dnsforwarding_stop { - system("$dnsforwarding_init stop 2&>1 /dev/null"); + system("$dnsforwarding_init stop >&/dev/null"); print "Stopping DNS forwarding.\n"; } @@ -62,6 +62,10 @@ sub dnsforwarding_get_values { my $config = new VyattaConfig; $config->setLevel("service dns-forwarding"); + my $cache_size = $config->returnValue("cache-size"); + if (defined $cache_size) { + $output .= "cache-size=$cache_size\n"; + } return $output; } -- cgit v1.2.3