diff options
author | James Davidson <james.davidson@vyatta.com> | 2013-02-26 11:12:46 -0800 |
---|---|---|
committer | James Davidson <james.davidson@vyatta.com> | 2013-02-26 11:32:35 -0800 |
commit | 8b2b6ed69c812c2b56f5fef4da4532d3e47def79 (patch) | |
tree | 9f60193fc2726e3980cb94474a1cee22e780663c /templates | |
parent | 9460a73f3bf4fb3c9b2b708e3b69bcc1831e2d4b (diff) | |
download | vyatta-op-8b2b6ed69c812c2b56f5fef4da4532d3e47def79.tar.gz vyatta-op-8b2b6ed69c812c2b56f5fef4da4532d3e47def79.zip |
Skip dmesg files starting with "Nothing has been logged yet"
Bug 8427
Initial processing of /etc/dmesg by savelog creates a file with only
one line:
(Nothing has been logged yet.)
Detect such files and skip them when listing all boot message files.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/show/system/boot-messages/all/node.def | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/show/system/boot-messages/all/node.def b/templates/show/system/boot-messages/all/node.def index 5a65654..b792d0a 100644 --- a/templates/show/system/boot-messages/all/node.def +++ b/templates/show/system/boot-messages/all/node.def @@ -2,4 +2,6 @@ help: Show all kernel boot messages run: LESSOPEN="|/usr/bin/lesspipe %s" LESSCLOSE="/usr/bin/lesspipe %s %s" \ less $_vyatta_less_options \ --prompt=".boot-messages?m, file %i of %m., page %dt of %D" \ - -- `printf "%s\n" /var/log/dmesg* | sort -nr` + -- $(printf "%s\n" /var/log/dmesg* | sort -nr | while read; do \ + if [[ "$(head -n 1 $REPLY)" != "(Nothing has been logged yet.)" ]]; then \ + echo $REPLY; fi; done) |