diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-10-18 12:56:12 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-10-27 17:11:33 -0500 |
commit | cc2d1c8575d0b50efe5d9449cac22e7749754d26 (patch) | |
tree | 45b137dc5c296de20857d604a53e2a695b21ffe5 /templates | |
parent | 756c4a467fae764430fa70f89c15d405c5943157 (diff) | |
download | vyatta-op-cc2d1c8575d0b50efe5d9449cac22e7749754d26.tar.gz vyatta-op-cc2d1c8575d0b50efe5d9449cac22e7749754d26.zip |
Bugfix 5806, 7552: Fix set date ntp node.def to list proper servers from configuration, and run on unprivledged ports so the commands work at the same time the ntp service is running.
(cherry picked from commit 40c15167d2834c7eb246d8a4160609c16bfa7df7)
Diffstat (limited to 'templates')
-rw-r--r-- | templates/set/date/ntp/node.def | 1 | ||||
-rw-r--r-- | templates/set/date/ntp/node.tag/node.def | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/templates/set/date/ntp/node.def b/templates/set/date/ntp/node.def index 0b8705c..9235d2e 100644 --- a/templates/set/date/ntp/node.def +++ b/templates/set/date/ntp/node.def @@ -1 +1,2 @@ help: Set system date and time from Network Time Protocol (NTP) server +run: sudo ntpdate -u 0.vyatta.pool.ntp.org diff --git a/templates/set/date/ntp/node.tag/node.def b/templates/set/date/ntp/node.tag/node.def index 7cf543c..92e0533 100644 --- a/templates/set/date/ntp/node.tag/node.def +++ b/templates/set/date/ntp/node.tag/node.def @@ -1,3 +1,6 @@ help: Set system date and time with given NTP server -allowed: echo -n '<hostname> <x.x.x.x> ntp.vyatta.com' -run: sudo ntpdate ${4:-ntp.vyatta.com} +allowed: local -a arr + eval "arr=($(cli-shell-api listEffectiveNodes system ntp server))" + echo -n "<hostname> <x.x.x.x>" ${arr[@]} +run: sudo ntpdate -u $4 + |