summaryrefslogtreecommitdiff
path: root/templates/service
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-10-13 14:24:02 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-10-13 18:01:17 -0700
commitd47ecbf8e2c9fe355f5afca77a2dd71f5e65f87f (patch)
treef43fdbbc79155c6f4850a3c93eb1f6722df6e5c5 /templates/service
parent6714c5321e0a488284b39a9314bfa127573e0ebf (diff)
downloadvyatta-cfg-system-d47ecbf8e2c9fe355f5afca77a2dd71f5e65f87f.tar.gz
vyatta-cfg-system-d47ecbf8e2c9fe355f5afca77a2dd71f5e65f87f.zip
Migrate NTP server to services ntp
Allows starting NTP server once at boot speeding up boot time and allows specifying some NTP server options
Diffstat (limited to 'templates/service')
-rw-r--r--templates/service/ntp/node.def18
-rw-r--r--templates/service/ntp/server/node.def3
-rw-r--r--templates/service/ntp/server/node.tag/dynamic/node.def2
-rw-r--r--templates/service/ntp/server/node.tag/noselect/node.def1
-rw-r--r--templates/service/ntp/server/node.tag/preempt/node.def1
-rw-r--r--templates/service/ntp/server/node.tag/prefer/node.def1
6 files changed, 26 insertions, 0 deletions
diff --git a/templates/service/ntp/node.def b/templates/service/ntp/node.def
new file mode 100644
index 00000000..c5d99724
--- /dev/null
+++ b/templates/service/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
diff --git a/templates/service/ntp/server/node.def b/templates/service/ntp/server/node.def
new file mode 100644
index 00000000..383bd992
--- /dev/null
+++ b/templates/service/ntp/server/node.def
@@ -0,0 +1,3 @@
+tag:
+type: txt
+help: Network Time Protocol (NTP) server
diff --git a/templates/service/ntp/server/node.tag/dynamic/node.def b/templates/service/ntp/server/node.tag/dynamic/node.def
new file mode 100644
index 00000000..0a7df0c0
--- /dev/null
+++ b/templates/service/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/service/ntp/server/node.tag/noselect/node.def b/templates/service/ntp/server/node.tag/noselect/node.def
new file mode 100644
index 00000000..e2e061b5
--- /dev/null
+++ b/templates/service/ntp/server/node.tag/noselect/node.def
@@ -0,0 +1 @@
+help: Marks the server as unused
diff --git a/templates/service/ntp/server/node.tag/preempt/node.def b/templates/service/ntp/server/node.tag/preempt/node.def
new file mode 100644
index 00000000..ca89efa1
--- /dev/null
+++ b/templates/service/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/service/ntp/server/node.tag/prefer/node.def b/templates/service/ntp/server/node.tag/prefer/node.def
new file mode 100644
index 00000000..4855fd41
--- /dev/null
+++ b/templates/service/ntp/server/node.tag/prefer/node.def
@@ -0,0 +1 @@
+help: Marks the server as preferred