summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2008-02-05 16:00:02 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2008-02-05 16:00:02 -0800
commitd8416c79e6bd75f357bea392ed88c53b67313fa2 (patch)
treea9eec8d5414499edaad613371a473471632d1298
parent2ebfcaf09728070b305f41d67a30de45d34413d7 (diff)
downloadvyatta-cfg-quagga-d8416c79e6bd75f357bea392ed88c53b67313fa2.tar.gz
vyatta-cfg-quagga-d8416c79e6bd75f357bea392ed88c53b67313fa2.zip
fix for bug 2768: add "dynamic" keyword to server entry.
-rw-r--r--templates/system/ntp-server/node.def30
1 files changed, 16 insertions, 14 deletions
diff --git a/templates/system/ntp-server/node.def b/templates/system/ntp-server/node.def
index 0468d7e8..e61ef918 100644
--- a/templates/system/ntp-server/node.def
+++ b/templates/system/ntp-server/node.def
@@ -1,17 +1,19 @@
multi:
type: txt
help: Name or IP address of NTP server
-update:expression: "sudo sh -c \"touch /etc/ntp.conf && \
-if ! grep -q 'server.*$VAR(@)' /etc/ntp.conf; then \
- echo \\\"server $VAR(@)\\\" >> /etc/ntp.conf && \
- /usr/sbin/invoke-rc.d ntp restart; \
-fi\" "
-delete:expression: "sudo sh -c \"touch /etc/ntp.conf && \
-if grep -q 'server.*$VAR(@)' /etc/ntp.conf; then \
- sed -i '/server $VAR(@)/d' /etc/ntp.conf && \
- if grep -q '^server ' /etc/ntp.conf; then \
- /usr/sbin/invoke-rc.d ntp restart; \
- else \
- /usr/sbin/invoke-rc.d ntp stop; \
- fi; \
-fi\" "
+update:sudo sh -c \
+ "touch /etc/ntp.conf
+ if ! grep -q 'server.*$VAR(@)' /etc/ntp.conf; then
+ echo \"server $VAR(@) iburst dynamic\" >> /etc/ntp.conf
+ /usr/sbin/invoke-rc.d ntp restart
+ fi"
+delete:sudo sh -c \
+ "touch /etc/ntp.conf
+ if grep -q 'server.*$VAR(@)' /etc/ntp.conf; then
+ sed -i '/server $VAR(@)/d' /etc/ntp.conf
+ if grep -q '^server ' /etc/ntp.conf; then
+ /usr/sbin/invoke-rc.d ntp restart
+ else
+ /usr/sbin/invoke-rc.d ntp stop
+ fi
+ fi"