diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2008-08-05 01:53:32 +0000 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2008-08-05 01:53:32 +0000 |
commit | d49c9edf95ecb4a94ad3800c336d081030e764c1 (patch) | |
tree | c7a615597c12825f9bc358fe3d91c84de111137e /scripts/dns-forwarding | |
parent | f6dbf8f85e1bcc2e01810e4b5989ee92345abfe1 (diff) | |
download | vyatta-cfg-system-d49c9edf95ecb4a94ad3800c336d081030e764c1.tar.gz vyatta-cfg-system-d49c9edf95ecb4a94ad3800c336d081030e764c1.zip |
- 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
Diffstat (limited to 'scripts/dns-forwarding')
-rw-r--r-- | scripts/dns-forwarding/vyatta-dns-forwarding.pl | 8 |
1 files changed, 6 insertions, 2 deletions
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; } |