summaryrefslogtreecommitdiff
path: root/templates/show/log
diff options
context:
space:
mode:
authorTom Grennan <tgrennan@vyatta.com>2008-03-20 13:43:35 -0700
committerTom Grennan <tgrennan@vyatta.com>2008-03-20 13:43:35 -0700
commit6695763f68fbf3acfb6c69739deca28217eaf8ef (patch)
tree395b48e2e2dd9268b9e480ae883f900a1b1b5ffc /templates/show/log
parentfbdbc9d257bd6682f9b70323e90469f188ea0dd0 (diff)
downloadvyatta-op-6695763f68fbf3acfb6c69739deca28217eaf8ef.tar.gz
vyatta-op-6695763f68fbf3acfb6c69739deca28217eaf8ef.zip
fix bug 3017
don't pipe through VYATTA_PAGER if run_cmd itself is a pager or tail
Diffstat (limited to 'templates/show/log')
-rw-r--r--templates/show/log/all/node.def2
-rw-r--r--templates/show/log/file/node.tag/node.def4
-rw-r--r--templates/show/log/node.def2
3 files changed, 4 insertions, 4 deletions
diff --git a/templates/show/log/all/node.def b/templates/show/log/all/node.def
index 87e959b..8df54f5 100644
--- a/templates/show/log/all/node.def
+++ b/templates/show/log/all/node.def
@@ -1,2 +1,2 @@
help: Show contents of all master log files
-run: ${vyatta_bindir}/vyatta-show-log-all
+run: less $_vyatta_less_options -- `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 a5a1c9d..5b80669 100644
--- a/templates/show/log/file/node.tag/node.def
+++ b/templates/show/log/file/node.tag/node.def
@@ -1,5 +1,5 @@
help: Show contents of user-defined log file
allowed: local -a array ;
array=( /var/log/user/* ) ;
- echo -n ${array[@]##*/}
-run: ${vyatta_bindir}/vyatta-show-log-file "$4"
+ [ ${#array[@]} -gt 0 ] && echo -n ${array[@]##*/} || echo -n none
+run: less $_vyatta_less_options -- /var/log/user/$4
diff --git a/templates/show/log/node.def b/templates/show/log/node.def
index 5f61e1d..13fad84 100644
--- a/templates/show/log/node.def
+++ b/templates/show/log/node.def
@@ -1,2 +1,2 @@
help: Show contents of current master log file
-run: ${vyatta_bindir}/vyatta-show-log
+run: less $_vyatta_less_options /var/log/messages