From 44029ab72eb3db14347b75a1dbd4f5adf4eb08f7 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 13 Oct 2010 18:11:56 -0700 Subject: Revise new ntp server config Putting it in 'system { ntp { server...' makes more sense. --- templates/system/ntp/node.def | 18 ++++++++++++++++++ templates/system/ntp/server/node.def | 3 +++ templates/system/ntp/server/node.tag/dynamic/node.def | 2 ++ templates/system/ntp/server/node.tag/noselect/node.def | 1 + templates/system/ntp/server/node.tag/preempt/node.def | 1 + templates/system/ntp/server/node.tag/prefer/node.def | 1 + 6 files changed, 26 insertions(+) create mode 100644 templates/system/ntp/node.def create mode 100644 templates/system/ntp/server/node.def create mode 100644 templates/system/ntp/server/node.tag/dynamic/node.def create mode 100644 templates/system/ntp/server/node.tag/noselect/node.def create mode 100644 templates/system/ntp/server/node.tag/preempt/node.def create mode 100644 templates/system/ntp/server/node.tag/prefer/node.def (limited to 'templates/system') 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 /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 diff --git a/templates/system/ntp/server/node.def b/templates/system/ntp/server/node.def new file mode 100644 index 00000000..383bd992 --- /dev/null +++ b/templates/system/ntp/server/node.def @@ -0,0 +1,3 @@ +tag: +type: txt +help: Network Time Protocol (NTP) server diff --git a/templates/system/ntp/server/node.tag/dynamic/node.def b/templates/system/ntp/server/node.tag/dynamic/node.def new file mode 100644 index 00000000..0a7df0c0 --- /dev/null +++ b/templates/system/ntp/server/node.tag/dynamic/node.def @@ -0,0 +1,2 @@ +help: Allow server to be configured eve if not reachable + diff --git a/templates/system/ntp/server/node.tag/noselect/node.def b/templates/system/ntp/server/node.tag/noselect/node.def new file mode 100644 index 00000000..e2e061b5 --- /dev/null +++ b/templates/system/ntp/server/node.tag/noselect/node.def @@ -0,0 +1 @@ +help: Marks the server as unused diff --git a/templates/system/ntp/server/node.tag/preempt/node.def b/templates/system/ntp/server/node.tag/preempt/node.def new file mode 100644 index 00000000..ca89efa1 --- /dev/null +++ b/templates/system/ntp/server/node.tag/preempt/node.def @@ -0,0 +1 @@ +help: Specifies the association as preemptable rather than the default persistent diff --git a/templates/system/ntp/server/node.tag/prefer/node.def b/templates/system/ntp/server/node.tag/prefer/node.def new file mode 100644 index 00000000..4855fd41 --- /dev/null +++ b/templates/system/ntp/server/node.tag/prefer/node.def @@ -0,0 +1 @@ +help: Marks the server as preferred -- cgit v1.2.3