From b09a999b8284895f5a8ff0233051a41b61eb690a Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Wed, 6 Aug 2008 12:00:31 +0000 Subject: change 'service dns forward' to 'service dns forwarding' --- templates/service/dns/forward/cache-size/node.def | 4 ---- .../service/dns/forward/ignore-interface/node.def | 19 ------------------- templates/service/dns/forward/node.def | 10 ---------- templates/service/dns/forwarding/cache-size/node.def | 4 ++++ .../service/dns/forwarding/ignore-interface/node.def | 19 +++++++++++++++++++ templates/service/dns/forwarding/node.def | 10 ++++++++++ 6 files changed, 33 insertions(+), 33 deletions(-) delete mode 100644 templates/service/dns/forward/cache-size/node.def delete mode 100644 templates/service/dns/forward/ignore-interface/node.def delete mode 100644 templates/service/dns/forward/node.def create mode 100644 templates/service/dns/forwarding/cache-size/node.def create mode 100644 templates/service/dns/forwarding/ignore-interface/node.def create mode 100644 templates/service/dns/forwarding/node.def (limited to 'templates/service/dns') diff --git a/templates/service/dns/forward/cache-size/node.def b/templates/service/dns/forward/cache-size/node.def deleted file mode 100644 index 3a73f308..00000000 --- a/templates/service/dns/forward/cache-size/node.def +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index f3c80832..00000000 --- a/templates/service/dns/forward/ignore-interface/node.def +++ /dev/null @@ -1,19 +0,0 @@ -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 deleted file mode 100644 index f84e4f02..00000000 --- a/templates/service/dns/forward/node.def +++ /dev/null @@ -1,10 +0,0 @@ -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/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; " -- cgit v1.2.3