summaryrefslogtreecommitdiff
path: root/templates/assign
diff options
context:
space:
mode:
authorTom Grennan <tgrennan@vyatta.com>2007-10-02 18:10:09 -0700
committerTom Grennan <tgrennan@vyatta.com>2007-10-02 18:10:09 -0700
commit69ec82541cd5d0c47d541ce94b1281a38c230d5d (patch)
treeb15ef0e981d9aef4783f53a017864fa5632c8d45 /templates/assign
parent3050d1d8fd671528e4258f0dd0ff26748e028cb7 (diff)
downloadvyatta-op-69ec82541cd5d0c47d541ce94b1281a38c230d5d.tar.gz
vyatta-op-69ec82541cd5d0c47d541ce94b1281a38c230d5d.zip
move operational date command completion to:
show date [utc] show ntp [SERVER] assign date [ntp <SERVER>]
Diffstat (limited to 'templates/assign')
-rw-r--r--templates/assign/date/node.def2
-rw-r--r--templates/assign/date/node.tag/node.def3
-rw-r--r--templates/assign/date/ntp/node.def2
-rw-r--r--templates/assign/date/ntp/node.tag/node.def3
4 files changed, 10 insertions, 0 deletions
diff --git a/templates/assign/date/node.def b/templates/assign/date/node.def
new file mode 100644
index 0000000..e6815c1
--- /dev/null
+++ b/templates/assign/date/node.def
@@ -0,0 +1,2 @@
+help: "Set date and time <MMDDhhmm[.ss]YYYY>"
+run: sudo /bin/date $3
diff --git a/templates/assign/date/node.tag/node.def b/templates/assign/date/node.tag/node.def
new file mode 100644
index 0000000..87849ff
--- /dev/null
+++ b/templates/assign/date/node.tag/node.def
@@ -0,0 +1,3 @@
+help: "Set date and time <MMDDhhmm[.ss]YYYY>"
+allowed: echo -n --
+run: sudo /bin/date $3
diff --git a/templates/assign/date/ntp/node.def b/templates/assign/date/ntp/node.def
new file mode 100644
index 0000000..2ce1577
--- /dev/null
+++ b/templates/assign/date/ntp/node.def
@@ -0,0 +1,2 @@
+help: "Set system date and time by NTP server [default: ntp.vyatta.com]"
+run: sudo ntpdate ntp.vyatta.com
diff --git a/templates/assign/date/ntp/node.tag/node.def b/templates/assign/date/ntp/node.tag/node.def
new file mode 100644
index 0000000..781bfbd
--- /dev/null
+++ b/templates/assign/date/ntp/node.tag/node.def
@@ -0,0 +1,3 @@
+help: "Set system date and time with given NTP server"
+allowed: sed 's/#.*//; s/^[^ \t]*[ \t]//; /^$/d; $s/$/\n--/' ${HOSTFILE:-/dev/null}
+run: sudo ntpdate ${4:-ntp.vyatta.com}