summaryrefslogtreecommitdiff
path: root/templates/system/name-server/node.def
diff options
context:
space:
mode:
Diffstat (limited to 'templates/system/name-server/node.def')
-rw-r--r--templates/system/name-server/node.def18
1 files changed, 2 insertions, 16 deletions
diff --git a/templates/system/name-server/node.def b/templates/system/name-server/node.def
index 3866e82c..f762a8a1 100644
--- a/templates/system/name-server/node.def
+++ b/templates/system/name-server/node.def
@@ -1,19 +1,5 @@
multi:
type: ipv4
help: Set Domain Name Server (DNS)
-update:expression: "sudo sh -c \"touch /etc/resolv.conf && \
-if grep -q '$VAR(@)' /etc/resolv.conf; then \
- exit 0; \
-else \
- mv -f /etc/resolv.conf /etc/old_resolv.conf && \
- echo \\\"nameserver\t $VAR(@)\\\" >> /etc/resolv.conf && \
- cat /etc/old_resolv.conf >> /etc/resolv.conf; \
-fi && \
-if [ -f /etc/ntp.conf ] && grep -q 'server' /etc/ntp.conf; then \
- /usr/sbin/invoke-rc.d ntp restart >&/dev/null; \
-fi\" "
-delete:expression: "sudo sh -c \"touch /etc/resolv.conf && \
-sed -i '/$VAR(@)/d' /etc/resolv.conf && \
-if [ -f /etc/ntp.conf ] && grep -q 'server' /etc/ntp.conf; then \
- /usr/sbin/invoke-rc.d ntp restart >&/dev/null; \
-fi\" "
+update: sudo /opt/vyatta/sbin/vyatta-system-nameservers update $VAR(@)
+delete: sudo /opt/vyatta/sbin/vyatta-system-nameservers delete $VAR(@)