diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-10-13 18:11:56 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-10-13 18:11:56 -0700 |
commit | 44029ab72eb3db14347b75a1dbd4f5adf4eb08f7 (patch) | |
tree | ccdbd262b7f168d4a26223bdc231a4b93d59ec6c /templates/system/ntp/node.def | |
parent | c626cd67f6ad7aba71ac78108b64f309f32b295f (diff) | |
download | vyatta-cfg-system-44029ab72eb3db14347b75a1dbd4f5adf4eb08f7.tar.gz vyatta-cfg-system-44029ab72eb3db14347b75a1dbd4f5adf4eb08f7.zip |
Revise new ntp server config
Putting it in 'system { ntp { server...' makes more sense.
Diffstat (limited to 'templates/system/ntp/node.def')
-rw-r--r-- | templates/system/ntp/node.def | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/templates/system/ntp/node.def b/templates/system/ntp/node.def new file mode 100644 index 00000000..c5d99724 --- /dev/null +++ b/templates/system/ntp/node.def @@ -0,0 +1,18 @@ +priority: 400 +help: Network Time Protocol (NTP) configuration + +end: + /opt/vyatta/sbin/vyatta_update_ntp.pl </etc/ntp.conf >/tmp/ntp.conf + sudo cp -b /tmp/ntp.conf /etc/ntp.conf + if grep -q '^server' /etc/ntp.conf + then + if /usr/sbin/invoke-rc.d ntp status >/dev/null + then + sudo /usr/sbin/invoke-rc.d ntp force-reload + else + sudo /usr/sbin/invoke-rc.d ntp start + fi + else + sudo /usr/sbin/invoke-rc.d ntp stop + fi + rm -f /tmp/ntp.conf |