From f7f94359f2fccaed84b8c73c1ab743450348eb75 Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Thu, 26 Jun 2008 16:46:56 +0000 Subject: => Modified vyatta_update_resolv.pl to update (i.e. add and remove) 'name-server' and 'domain-name-server' options in /etc/resolv.conf received by a dhcp client for an interface => Modified name-server/node.def so as to have the name-server set by our CLI on the top of /etc/resolv.conf to take priority over name-servers received from dhcp client --- templates/system/name-server/node.def | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'templates') diff --git a/templates/system/name-server/node.def b/templates/system/name-server/node.def index 0ed43351..3866e82c 100644 --- a/templates/system/name-server/node.def +++ b/templates/system/name-server/node.def @@ -5,7 +5,9 @@ update:expression: "sudo sh -c \"touch /etc/resolv.conf && \ if grep -q '$VAR(@)' /etc/resolv.conf; then \ exit 0; \ else \ - echo \\\"nameserver\t $VAR(@)\\\" >> /etc/resolv.conf; \ + 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; \ -- cgit v1.2.3