diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2008-08-06 12:00:31 +0000 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2008-08-06 12:00:31 +0000 |
commit | b09a999b8284895f5a8ff0233051a41b61eb690a (patch) | |
tree | 202a1a1f8354c65405986a6a0e4c2b9dee01517f /templates/service/dns/forwarding | |
parent | d86fe348aa578c5f83bd7c24c0ed2875a343220d (diff) | |
download | vyatta-cfg-system-b09a999b8284895f5a8ff0233051a41b61eb690a.tar.gz vyatta-cfg-system-b09a999b8284895f5a8ff0233051a41b61eb690a.zip |
change 'service dns forward' to 'service dns forwarding'
Diffstat (limited to 'templates/service/dns/forwarding')
-rw-r--r-- | templates/service/dns/forwarding/cache-size/node.def | 4 | ||||
-rw-r--r-- | templates/service/dns/forwarding/ignore-interface/node.def | 19 | ||||
-rw-r--r-- | templates/service/dns/forwarding/node.def | 10 |
3 files changed, 33 insertions, 0 deletions
diff --git a/templates/service/dns/forwarding/cache-size/node.def b/templates/service/dns/forwarding/cache-size/node.def new file mode 100644 index 00000000..3a73f308 --- /dev/null +++ b/templates/service/dns/forwarding/cache-size/node.def @@ -0,0 +1,4 @@ +type: u32 +default:150 +help: Set DNS forwarding cache size +syntax:expression: ($VAR(@) >=0 && $VAR(@) < 10001) ; "Cache size must be between 0 and 10000" diff --git a/templates/service/dns/forwarding/ignore-interface/node.def b/templates/service/dns/forwarding/ignore-interface/node.def new file mode 100644 index 00000000..f3c80832 --- /dev/null +++ b/templates/service/dns/forwarding/ignore-interface/node.def @@ -0,0 +1,19 @@ +multi: +type: txt +help: Set interface to ignore DNS queries on +syntax:expression: exec " + intf_array=($(awk '$1 ~ /:$/ { print $1 }' /proc/net/dev)) + intf_array_len=${#intf_array[*]} + i=0 + while [ $i -lt $intf_array_len ]; do + if [ \"${intf_array[$i]}\" == \"$VAR(@):\" ] ; then + exit 0 + fi + let i++ + done + echo Invalid ethernet interface [$VAR(@)] + exit 1 " + +allowed: local -a array ; + array=($(awk '$1 ~ /:/ { print $1 }' /proc/net/dev)); + echo -n ${array[@]%:*} diff --git a/templates/service/dns/forwarding/node.def b/templates/service/dns/forwarding/node.def new file mode 100644 index 00000000..f84e4f02 --- /dev/null +++ b/templates/service/dns/forwarding/node.def @@ -0,0 +1,10 @@ +help: Configure Domain Name Server (DNS) forwarding +syntax:expression: exec "/opt/vyatta/sbin/vyatta-dns-forwarding.pl --nameserver"; "No nameserver exists to forward DNS queries" +create:expression: "/opt/vyatta/sbin/vyatta-dns-forwarding.pl --init-dnsforwarding" +delete:expression: "touch /tmp/dnsmasq.$PPID" +end:expression: "if [ -f \"/tmp/dnsmasq.$PPID\" ]; then \ + sudo /opt/vyatta/sbin/vyatta-dns-forwarding.pl --stop-dnsforwarding \ + rm /tmp/dnsmasq.$PPID; \ + else \ + sudo /opt/vyatta/sbin/vyatta-dns-forwarding.pl --update-dnsforwarding; \ + fi; " |