diff options
author | Tom Grennan <tgrennan@vyatta.com> | 2007-11-30 18:07:53 -0800 |
---|---|---|
committer | Tom Grennan <tgrennan@vyatta.com> | 2007-11-30 18:07:53 -0800 |
commit | f6178a5b8fadae89dfe2630bc27ed8b16f51f7fe (patch) | |
tree | 69219b37143972d7a356c938bb3d1433ef85dad7 | |
parent | 6f36e1824194fc32f9de9e0531248669dcab0a89 (diff) | |
download | vyatta-op-f6178a5b8fadae89dfe2630bc27ed8b16f51f7fe.tar.gz vyatta-op-f6178a5b8fadae89dfe2630bc27ed8b16f51f7fe.zip |
fix "show system [boot|kernel]-messages"
-rw-r--r-- | Makefile.am | 1 | ||||
-rwxr-xr-x | scripts/vyatta-show-dmesg-all | 9 | ||||
-rw-r--r-- | templates/show/system/boot-messages/all/node.def | 2 | ||||
-rw-r--r-- | templates/show/system/boot-messages/node.def | 4 | ||||
-rw-r--r-- | templates/show/system/kernel-messages/node.def | 2 |
5 files changed, 15 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am index 8374a6d..69d449e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,6 +11,7 @@ alloweddir = $(datadir)/vyatta-op/functions/allowed allowed_DATA = functions/allowed/hosts bin_SCRIPTS = scripts/vyatta-show-interfaces +bin_SCRIPTS += scripts/vyatta-show-dmesg-all bin_SCRIPTS += scripts/vyatta-show-log-all bin_SCRIPTS += scripts/vyatta-show-version diff --git a/scripts/vyatta-show-dmesg-all b/scripts/vyatta-show-dmesg-all new file mode 100755 index 0000000..d511ea0 --- /dev/null +++ b/scripts/vyatta-show-dmesg-all @@ -0,0 +1,9 @@ +#!/bin/bash + +shopt -s extglob nullglob + +declare -a zipped_files=($( printf "%s\n" /var/log/dmesg*.gz | sort -r )) +declare -a plain_files=($( printf "%s\n" /var/log/dmesg!(*.gz) | sort -r )) + +[ ${#zipped_files[@]} -gt 0 ] && gunzip --stdout ${zipped_files[@]} +[ ${#plain_files[@]} -gt 0 ] && cat ${plain_files[@]} diff --git a/templates/show/system/boot-messages/all/node.def b/templates/show/system/boot-messages/all/node.def new file mode 100644 index 0000000..b151fc2 --- /dev/null +++ b/templates/show/system/boot-messages/all/node.def @@ -0,0 +1,2 @@ +help: Show all kernel boot messages +run: ${vyatta_bindir}/vyatta-show-dmesg-all diff --git a/templates/show/system/boot-messages/node.def b/templates/show/system/boot-messages/node.def index acf2173..fb24eeb 100644 --- a/templates/show/system/boot-messages/node.def +++ b/templates/show/system/boot-messages/node.def @@ -1,2 +1,2 @@ -help: Show kernel boot messages -run: sudo ${OFR_PAGER:-cat -s} /var/log/dmes? /dev/null +help: Show most recent kernel boot messages +run: cat /var/log/dmes? /dev/null diff --git a/templates/show/system/kernel-messages/node.def b/templates/show/system/kernel-messages/node.def index 4457b69..6f41ae3 100644 --- a/templates/show/system/kernel-messages/node.def +++ b/templates/show/system/kernel-messages/node.def @@ -1,2 +1,2 @@ help: Show messages in kernel ring buffer -run: dmesg | ${OFR_PAGER:-cat -s} +run: dmesg |