summaryrefslogtreecommitdiff
path: root/templates/assign
diff options
context:
space:
mode:
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}