diff options
author | Michael Larson <slioch@eng-140.vyatta.com> | 2008-02-06 16:21:15 -0800 |
---|---|---|
committer | Michael Larson <slioch@eng-140.vyatta.com> | 2008-02-06 16:21:15 -0800 |
commit | 1bfb6d05e36905581abdc000d9f5801d3541b1be (patch) | |
tree | 3dff51f86f8651d2bb51e6d0806bed6af70c3a96 | |
parent | f0a8d0c3bbcd410b65648fd6971d8d03fdf91d0c (diff) | |
parent | d8416c79e6bd75f357bea392ed88c53b67313fa2 (diff) | |
download | vyatta-cfg-system-1bfb6d05e36905581abdc000d9f5801d3541b1be.tar.gz vyatta-cfg-system-1bfb6d05e36905581abdc000d9f5801d3541b1be.zip |
Merge branch 'glendale' of http://git.vyatta.com/vyatta-cfg-system into glendale
-rw-r--r-- | templates/system/ntp-server/node.def | 30 |
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" |