From 613ffa56d28ba653c9d7917f6e9f1f2bd108ac97 Mon Sep 17 00:00:00 2001 From: Tom Grennan Date: Wed, 3 Oct 2007 10:31:37 -0700 Subject: use the command verb "set" instead of "assign" with pass-through of wild-card options to bash builtin --- templates/assign/date/node.def | 2 -- templates/assign/date/node.tag/node.def | 3 --- templates/assign/date/ntp/node.def | 2 -- templates/assign/date/ntp/node.tag/node.def | 3 --- templates/set/date/node.def | 1 + templates/set/date/node.tag/node.def | 3 +++ templates/set/date/ntp/node.def | 2 ++ templates/set/date/ntp/node.tag/node.def | 3 +++ templates/set/node.tag/node.def | 3 +++ 9 files changed, 12 insertions(+), 10 deletions(-) delete mode 100644 templates/assign/date/node.def delete mode 100644 templates/assign/date/node.tag/node.def delete mode 100644 templates/assign/date/ntp/node.def delete mode 100644 templates/assign/date/ntp/node.tag/node.def create mode 100644 templates/set/date/node.def create mode 100644 templates/set/date/node.tag/node.def create mode 100644 templates/set/date/ntp/node.def create mode 100644 templates/set/date/ntp/node.tag/node.def create mode 100644 templates/set/node.tag/node.def (limited to 'templates') diff --git a/templates/assign/date/node.def b/templates/assign/date/node.def deleted file mode 100644 index e6815c1..0000000 --- a/templates/assign/date/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Set date and time " -run: sudo /bin/date $3 diff --git a/templates/assign/date/node.tag/node.def b/templates/assign/date/node.tag/node.def deleted file mode 100644 index 87849ff..0000000 --- a/templates/assign/date/node.tag/node.def +++ /dev/null @@ -1,3 +0,0 @@ -help: "Set date and time " -allowed: echo -n -- -run: sudo /bin/date $3 diff --git a/templates/assign/date/ntp/node.def b/templates/assign/date/ntp/node.def deleted file mode 100644 index 2ce1577..0000000 --- a/templates/assign/date/ntp/node.def +++ /dev/null @@ -1,2 +0,0 @@ -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 deleted file mode 100644 index 781bfbd..0000000 --- a/templates/assign/date/ntp/node.tag/node.def +++ /dev/null @@ -1,3 +0,0 @@ -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/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 $* -- cgit v1.2.3