summaryrefslogtreecommitdiff
path: root/templates/set
diff options
context:
space:
mode:
Diffstat (limited to 'templates/set')
-rw-r--r--templates/set/date/node.def1
-rw-r--r--templates/set/date/node.tag/node.def3
-rw-r--r--templates/set/date/ntp/node.def2
-rw-r--r--templates/set/date/ntp/node.tag/node.def3
-rw-r--r--templates/set/node.tag/node.def3
5 files changed, 12 insertions, 0 deletions
diff --git a/templates/set/date/node.def b/templates/set/date/node.def
new file mode 100644
index 0000000..05aa096
--- /dev/null
+++ b/templates/set/date/node.def
@@ -0,0 +1 @@
+help: "Set date and time"
diff --git a/templates/set/date/node.tag/node.def b/templates/set/date/node.tag/node.def
new file mode 100644
index 0000000..2698b04
--- /dev/null
+++ b/templates/set/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/set/date/ntp/node.def b/templates/set/date/ntp/node.def
new file mode 100644
index 0000000..2ce1577
--- /dev/null
+++ b/templates/set/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/set/date/ntp/node.tag/node.def b/templates/set/date/ntp/node.tag/node.def
new file mode 100644
index 0000000..781bfbd
--- /dev/null
+++ b/templates/set/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}
diff --git a/templates/set/node.tag/node.def b/templates/set/node.tag/node.def
new file mode 100644
index 0000000..a89976a
--- /dev/null
+++ b/templates/set/node.tag/node.def
@@ -0,0 +1,3 @@
+help: "Bash builtin set command"
+allowed: echo -n --
+run: builtin $*