diff options
Diffstat (limited to 'templates/service/dns')
-rw-r--r-- | templates/service/dns/forwarding/dhcp/node.def | 9 | ||||
-rw-r--r-- | templates/service/dns/forwarding/name-server/node.def | 3 | ||||
-rw-r--r-- | templates/service/dns/forwarding/node.def | 4 | ||||
-rw-r--r-- | templates/service/dns/forwarding/system/node.def | 2 |
4 files changed, 15 insertions, 3 deletions
diff --git a/templates/service/dns/forwarding/dhcp/node.def b/templates/service/dns/forwarding/dhcp/node.def new file mode 100644 index 00000000..24598129 --- /dev/null +++ b/templates/service/dns/forwarding/dhcp/node.def @@ -0,0 +1,9 @@ +multi: +type: txt +help: Set to forward DNS queries to nameservers received from DHCP server for specified interface +syntax:expression: exec "/opt/vyatta/sbin/vyatta-dns-forwarding.pl --dhcp-interface $VAR(@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-dns-forwarding.pl --dhcp-interface-nameserver $VAR(@)" +allowed: + local -a array ; + array=( /var/lib/dhcp3/eth* ) ; + echo -n ${array[@]##*/} diff --git a/templates/service/dns/forwarding/name-server/node.def b/templates/service/dns/forwarding/name-server/node.def new file mode 100644 index 00000000..ad67c6de --- /dev/null +++ b/templates/service/dns/forwarding/name-server/node.def @@ -0,0 +1,3 @@ +multi: +type: ipv4 +help: Set DNS server to forward queries diff --git a/templates/service/dns/forwarding/node.def b/templates/service/dns/forwarding/node.def index f84e4f02..46dbd199 100644 --- a/templates/service/dns/forwarding/node.def +++ b/templates/service/dns/forwarding/node.def @@ -1,6 +1,4 @@ -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" +help: Configure DNS forwarding delete:expression: "touch /tmp/dnsmasq.$PPID" end:expression: "if [ -f \"/tmp/dnsmasq.$PPID\" ]; then \ sudo /opt/vyatta/sbin/vyatta-dns-forwarding.pl --stop-dnsforwarding \ diff --git a/templates/service/dns/forwarding/system/node.def b/templates/service/dns/forwarding/system/node.def new file mode 100644 index 00000000..e92a7ad6 --- /dev/null +++ b/templates/service/dns/forwarding/system/node.def @@ -0,0 +1,2 @@ +help: Set DNS forwarding to system nameservers +commit:expression: exec "/opt/vyatta/sbin/vyatta-dns-forwarding.pl --system-nameserver" |