diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2008-08-05 16:35:44 +0000 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2008-08-05 16:35:44 +0000 |
commit | fe08c6b8586e63e9b441c73da1e9f712849e251e (patch) | |
tree | d3ee21d6a391fc22279ff264fa03353cefb9ba65 /templates/service/dns | |
parent | 5249053c47fd72a36870c2195eefabc7915b92e5 (diff) | |
download | vyatta-cfg-system-fe08c6b8586e63e9b441c73da1e9f712849e251e.tar.gz vyatta-cfg-system-fe08c6b8586e63e9b441c73da1e9f712849e251e.zip |
change DNS forwarding CLI from 'service dns-forwarding' to 'service dns forward'
Diffstat (limited to 'templates/service/dns')
-rw-r--r-- | templates/service/dns/forward/cache-size/node.def | 4 | ||||
-rw-r--r-- | templates/service/dns/forward/ignore-interface/node.def | 19 | ||||
-rw-r--r-- | templates/service/dns/forward/node.def | 10 | ||||
-rw-r--r-- | templates/service/dns/node.def | 1 |
4 files changed, 34 insertions, 0 deletions
diff --git a/templates/service/dns/forward/cache-size/node.def b/templates/service/dns/forward/cache-size/node.def new file mode 100644 index 00000000..3a73f308 --- /dev/null +++ b/templates/service/dns/forward/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/forward/ignore-interface/node.def b/templates/service/dns/forward/ignore-interface/node.def new file mode 100644 index 00000000..5355eecf --- /dev/null +++ b/templates/service/dns/forward/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/forward/node.def b/templates/service/dns/forward/node.def new file mode 100644 index 00000000..f84e4f02 --- /dev/null +++ b/templates/service/dns/forward/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; " diff --git a/templates/service/dns/node.def b/templates/service/dns/node.def new file mode 100644 index 00000000..d7040d0d --- /dev/null +++ b/templates/service/dns/node.def @@ -0,0 +1 @@ +help: Configure Domain Name Server (DNS) parameters |