summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Grennan <tgrennan@vyatta.com>2007-10-04 17:59:15 -0700
committerTom Grennan <tgrennan@vyatta.com>2007-10-04 17:59:15 -0700
commitef21466f9202fe7406cd07f22838a7a349fde4ef (patch)
tree5c44d6ab4e9fb02a09fcb921a56485c09ff2ab1c
parentcfd6a6d391ae4978aa86377cd345a424eea9d656 (diff)
downloadvyatta-op-ef21466f9202fe7406cd07f22838a7a349fde4ef.tar.gz
vyatta-op-ef21466f9202fe7406cd07f22838a7a349fde4ef.zip
make sure wildcard is appended to allowed list, even with null HOSTFILE
-rw-r--r--templates/set/date/ntp/node.tag/node.def3
-rw-r--r--templates/show/ntp/node.tag/node.def3
2 files changed, 4 insertions, 2 deletions
diff --git a/templates/set/date/ntp/node.tag/node.def b/templates/set/date/ntp/node.tag/node.def
index 781bfbd..7add4fa 100644
--- a/templates/set/date/ntp/node.tag/node.def
+++ b/templates/set/date/ntp/node.tag/node.def
@@ -1,3 +1,4 @@
help: "Set system date and time with given NTP server"
-allowed: sed 's/#.*//; s/^[^ \t]*[ \t]//; /^$/d; $s/$/\n--/' ${HOSTFILE:-/dev/null}
+allowed: sed 's/#.*//; s/^[^ \t]*[ \t]//; /^$/d' ${HOSTFILE:-/dev/null} ;
+ echo --
run: sudo ntpdate ${4:-ntp.vyatta.com}
diff --git a/templates/show/ntp/node.tag/node.def b/templates/show/ntp/node.tag/node.def
index 691fa9d..9d953fa 100644
--- a/templates/show/ntp/node.tag/node.def
+++ b/templates/show/ntp/node.tag/node.def
@@ -1,3 +1,4 @@
help: "Show date and time of given NTP server"
-allowed: sed 's/#.*//; s/^[^ \t]*[ \t]//; /^$/d; $s/$/\n--/' ${HOSTFILE:-/dev/null}
+allowed: sed 's/#.*//; s/^[^ \t]*[ \t]//; /^$/d' ${HOSTFILE:-/dev/null} ;
+ echo --
run: ntpdate -q ${3:-ntp.vyatta.com}