From cb7488952417b19d6a33ef7e9349ff13ca6e92da Mon Sep 17 00:00:00 2001
From: Mohit Mehta <mohit.mehta@vyatta.com>
Date: Thu, 7 Aug 2008 06:52:29 +0000
Subject: any change in system name-servers should be communicated to dnsmasq

---
 templates/system/name-server/node.def | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'templates/system/name-server/node.def')

diff --git a/templates/system/name-server/node.def b/templates/system/name-server/node.def
index 3866e82c..b5f38527 100644
--- a/templates/system/name-server/node.def
+++ b/templates/system/name-server/node.def
@@ -9,6 +9,9 @@ else \
   echo \\\"nameserver\t $VAR(@)\\\" >> /etc/resolv.conf && \
   cat /etc/old_resolv.conf >>  /etc/resolv.conf; \
 fi && \
+if [ -d /opt/vyatta/config/active/service/dns/forwarding ]; then \
+   /opt/vyatta/sbin/vyatta-dns-forwarding.pl --update-dnsforwarding >&/dev/null; \
+fi && \
 if [ -f /etc/ntp.conf ] && grep -q 'server' /etc/ntp.conf; then \
   /usr/sbin/invoke-rc.d ntp restart >&/dev/null; \
 fi\" "
@@ -16,4 +19,7 @@ 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 && \
+if [ -d /opt/vyatta/config/active/service/dns/forwarding ]; then \
+      /opt/vyatta/sbin/vyatta-dns-forwarding.pl --update-dnsforwarding >&/dev/null; \
 fi\" "
-- 
cgit v1.2.3

