summaryrefslogtreecommitdiff
path: root/templates/show/log
diff options
context:
space:
mode:
authorTom Grennan <tgrennan@vyatta.com>2008-03-21 12:16:11 -0700
committerTom Grennan <tgrennan@vyatta.com>2008-03-21 12:16:11 -0700
commit7612557a0ad1ae9c965c1d836038f2a5a18ddb41 (patch)
tree998946f6b651eb7f98b2102ad2140d614703f405 /templates/show/log
parent81368cafa73984d475f4c59fc522ad3a1d7fb610 (diff)
downloadvyatta-op-7612557a0ad1ae9c965c1d836038f2a5a18ddb41.tar.gz
vyatta-op-7612557a0ad1ae9c965c1d836038f2a5a18ddb41.zip
use less prompt to display the "show" content
Diffstat (limited to 'templates/show/log')
-rw-r--r--templates/show/log/all/node.def4
-rw-r--r--templates/show/log/file/node.tag/node.def4
-rw-r--r--templates/show/log/node.def4
3 files changed, 9 insertions, 3 deletions
diff --git a/templates/show/log/all/node.def b/templates/show/log/all/node.def
index 8df54f5..069d1d4 100644
--- a/templates/show/log/all/node.def
+++ b/templates/show/log/all/node.def
@@ -1,2 +1,4 @@
help: Show contents of all master log files
-run: less $_vyatta_less_options -- `printf "%s\n" /var/log/messages* | sort -nr`
+run: less $_vyatta_less_options \
+ --prompt=".log?m, file %i of %m., page %dt of %D" \
+ -- `printf "%s\n" /var/log/messages* | sort -nr`
diff --git a/templates/show/log/file/node.tag/node.def b/templates/show/log/file/node.tag/node.def
index 5b80669..f62a334 100644
--- a/templates/show/log/file/node.tag/node.def
+++ b/templates/show/log/file/node.tag/node.def
@@ -2,4 +2,6 @@ help: Show contents of user-defined log file
allowed: local -a array ;
array=( /var/log/user/* ) ;
[ ${#array[@]} -gt 0 ] && echo -n ${array[@]##*/} || echo -n none
-run: less $_vyatta_less_options -- /var/log/user/$4
+run: less $_vyatta_less_options \
+ --prompt=".$4 log, page %dt of %D" \
+ -- /var/log/user/$4
diff --git a/templates/show/log/node.def b/templates/show/log/node.def
index 13fad84..3d37d84 100644
--- a/templates/show/log/node.def
+++ b/templates/show/log/node.def
@@ -1,2 +1,4 @@
help: Show contents of current master log file
-run: less $_vyatta_less_options /var/log/messages
+run: less $_vyatta_less_options \
+ --prompt=".log, page %dt of %D" \
+ -- /var/log/messages