summaryrefslogtreecommitdiff
path: root/templates/service
diff options
context:
space:
mode:
authorMohit Mehta <mohit.mehta@vyatta.com>2008-08-06 22:15:10 +0000
committerMohit Mehta <mohit.mehta@vyatta.com>2008-08-06 22:15:10 +0000
commitdc4d53c9eb42a6f9f27f0de762de85ce46b6f788 (patch)
treecf9a60ff7c6b31b239ad0b54ce164eb1fab65e04 /templates/service
parent0f78fcfe3c21e4d07b402aaae75bb494fc4e4133 (diff)
downloadvyatta-cfg-system-dc4d53c9eb42a6f9f27f0de762de85ce46b6f788.tar.gz
vyatta-cfg-system-dc4d53c9eb42a6f9f27f0de762de85ce46b6f788.zip
code to specify DNS forwarding nameservers (system, dhcp, explicitly specified) using CLI
Diffstat (limited to 'templates/service')
-rw-r--r--templates/service/dns/forwarding/dhcp/node.def9
-rw-r--r--templates/service/dns/forwarding/name-server/node.def3
-rw-r--r--templates/service/dns/forwarding/node.def4
-rw-r--r--templates/service/dns/forwarding/system/node.def2
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"