diff options
author | Tom Grennan <tgrennan@vyatta.com> | 2007-10-02 18:10:09 -0700 |
---|---|---|
committer | Tom Grennan <tgrennan@vyatta.com> | 2007-10-02 18:10:09 -0700 |
commit | 69ec82541cd5d0c47d541ce94b1281a38c230d5d (patch) | |
tree | b15ef0e981d9aef4783f53a017864fa5632c8d45 | |
parent | 3050d1d8fd671528e4258f0dd0ff26748e028cb7 (diff) | |
download | vyatta-op-69ec82541cd5d0c47d541ce94b1281a38c230d5d.tar.gz vyatta-op-69ec82541cd5d0c47d541ce94b1281a38c230d5d.zip |
move operational date command completion to:
show date [utc]
show ntp [SERVER]
assign date [ntp <SERVER>]
-rw-r--r-- | templates/assign/date/node.def (renamed from templates/date/set/node.def) | 0 | ||||
-rw-r--r-- | templates/assign/date/node.tag/node.def | 3 | ||||
-rw-r--r-- | templates/assign/date/ntp/node.def | 2 | ||||
-rw-r--r-- | templates/assign/date/ntp/node.tag/node.def | 3 | ||||
-rw-r--r-- | templates/date/local/node.def | 2 | ||||
-rw-r--r-- | templates/date/ntp/node.def | 2 | ||||
-rw-r--r-- | templates/date/ntp/set/node.def | 2 | ||||
-rw-r--r-- | templates/show/date/node.def (renamed from templates/date/node.def) | 2 | ||||
-rw-r--r-- | templates/show/date/utc/node.def (renamed from templates/date/utc/node.def) | 0 | ||||
-rw-r--r-- | templates/show/ntp/node.def | 2 | ||||
-rw-r--r-- | templates/show/ntp/node.tag/node.def | 3 |
11 files changed, 14 insertions, 7 deletions
diff --git a/templates/date/set/node.def b/templates/assign/date/node.def index e6815c1..e6815c1 100644 --- a/templates/date/set/node.def +++ b/templates/assign/date/node.def 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} diff --git a/templates/date/local/node.def b/templates/date/local/node.def deleted file mode 100644 index 942be57..0000000 --- a/templates/date/local/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Show system date and time with local timezone" -run: /bin/date diff --git a/templates/date/ntp/node.def b/templates/date/ntp/node.def deleted file mode 100644 index bccd9c8..0000000 --- a/templates/date/ntp/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Show date and time of given NTP server [default: ntp.vyatta.com]" -run: ntpdate -q ${3-ntp.vyatta.com} diff --git a/templates/date/ntp/set/node.def b/templates/date/ntp/set/node.def deleted file mode 100644 index 7f87d70..0000000 --- a/templates/date/ntp/set/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: "Synchronize system date and time with given NTP server" -run: sudo ntpdate ${4-ntp.vyatta.com} diff --git a/templates/date/node.def b/templates/show/date/node.def index 23b4ff3..10e01a3 100644 --- a/templates/date/node.def +++ b/templates/show/date/node.def @@ -1,2 +1,2 @@ help: "Show system date and time" -run: /bin/date -u +run: /bin/date diff --git a/templates/date/utc/node.def b/templates/show/date/utc/node.def index d24808f..d24808f 100644 --- a/templates/date/utc/node.def +++ b/templates/show/date/utc/node.def diff --git a/templates/show/ntp/node.def b/templates/show/ntp/node.def new file mode 100644 index 0000000..bd75136 --- /dev/null +++ b/templates/show/ntp/node.def @@ -0,0 +1,2 @@ +help: "Show date and time of network server [default: ntp.vyatta.com]" +run: ntpdate -q ntp.vyatta.com diff --git a/templates/show/ntp/node.tag/node.def b/templates/show/ntp/node.tag/node.def new file mode 100644 index 0000000..691fa9d --- /dev/null +++ b/templates/show/ntp/node.tag/node.def @@ -0,0 +1,3 @@ +help: "Show date and time of given NTP server" +allowed: sed 's/#.*//; s/^[^ \t]*[ \t]//; /^$/d; $s/$/\n--/' ${HOSTFILE:-/dev/null} +run: ntpdate -q ${3:-ntp.vyatta.com} |