diff options
author | Tom Grennan <tgrennan@vyatta.com> | 2008-03-21 12:16:11 -0700 |
---|---|---|
committer | Tom Grennan <tgrennan@vyatta.com> | 2008-03-21 12:16:11 -0700 |
commit | 7612557a0ad1ae9c965c1d836038f2a5a18ddb41 (patch) | |
tree | 998946f6b651eb7f98b2102ad2140d614703f405 | |
parent | 81368cafa73984d475f4c59fc522ad3a1d7fb610 (diff) | |
download | vyatta-op-7612557a0ad1ae9c965c1d836038f2a5a18ddb41.tar.gz vyatta-op-7612557a0ad1ae9c965c1d836038f2a5a18ddb41.zip |
use less prompt to display the "show" content
-rw-r--r-- | templates/show/hardware/cpu/node.def | 4 | ||||
-rw-r--r-- | templates/show/hardware/mem/node.def | 4 | ||||
-rw-r--r-- | templates/show/license/node.def | 4 | ||||
-rw-r--r-- | templates/show/log/all/node.def | 4 | ||||
-rw-r--r-- | templates/show/log/file/node.tag/node.def | 4 | ||||
-rw-r--r-- | templates/show/log/node.def | 4 | ||||
-rw-r--r-- | templates/show/system/boot-messages/all/node.def | 4 | ||||
-rw-r--r-- | templates/show/system/boot-messages/node.def | 4 |
8 files changed, 24 insertions, 8 deletions
diff --git a/templates/show/hardware/cpu/node.def b/templates/show/hardware/cpu/node.def index 4339af2..2e3c616 100644 --- a/templates/show/hardware/cpu/node.def +++ b/templates/show/hardware/cpu/node.def @@ -1,2 +1,4 @@ help: Show system CPU details -run: cat /proc/cpuinfo +run: less $_vyatta_less_options \ + --prompt=".cpu info" \ + -- /proc/cpuinfo diff --git a/templates/show/hardware/mem/node.def b/templates/show/hardware/mem/node.def index 7a54e52..acf1109 100644 --- a/templates/show/hardware/mem/node.def +++ b/templates/show/hardware/mem/node.def @@ -1,2 +1,4 @@ help: Show system RAM details -run: cat /proc/meminfo +run: less $_vyatta_less_options \ + --prompt=".mem info" \ + -- /proc/meminfo diff --git a/templates/show/license/node.def b/templates/show/license/node.def index eadfbbf..2108f30 100644 --- a/templates/show/license/node.def +++ b/templates/show/license/node.def @@ -1,2 +1,4 @@ help: Show Vyatta license information -run: cat ${vyatta_sysconfdir}/LICENSE +run: less $_vyatta_less_options \ + --prompt=".license, page %dt of %D" \ + -- ${vyatta_sysconfdir}/LICENSE 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 diff --git a/templates/show/system/boot-messages/all/node.def b/templates/show/system/boot-messages/all/node.def index d472c33..e414987 100644 --- a/templates/show/system/boot-messages/all/node.def +++ b/templates/show/system/boot-messages/all/node.def @@ -1,2 +1,4 @@ help: Show all kernel boot messages -run: less $_vyatta_less_options -- `printf "%s\n" /var/log/dmesg* | sort -nr` +run: less $_vyatta_less_options \ + --prompt=".boot-messages?m, file %i of %m., page %dt of %D" \ + -- `printf "%s\n" /var/log/dmesg* | sort -nr` diff --git a/templates/show/system/boot-messages/node.def b/templates/show/system/boot-messages/node.def index ee5ae38..97bbb61 100644 --- a/templates/show/system/boot-messages/node.def +++ b/templates/show/system/boot-messages/node.def @@ -1,2 +1,4 @@ help: Show most recent kernel boot messages -run: less $_vyatta_less_options /var/log/dmesg +run: less $_vyatta_less_options \ + --prompt=".boot-messages, page %dt of %D" \ + -- /var/log/dmesg |