projects
/
ceph-cm-ansible.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
185ee52
)
common: smart.sh - sort failure messages
author
David Galloway
<dgallowa@redhat.com>
Wed, 25 Nov 2020 15:02:58 +0000
(10:02 -0500)
committer
David Galloway
<dgallowa@redhat.com>
Wed, 25 Nov 2020 15:25:27 +0000
(10:25 -0500)
Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/common/files/libexec/smart.sh
patch
|
blob
|
history
diff --git
a/roles/common/files/libexec/smart.sh
b/roles/common/files/libexec/smart.sh
index 332f36478801266ea0821eb970d86ed341e77432..2287a1d49a823967b4d5402a7e3315231e0736b2 100755
(executable)
--- a/
roles/common/files/libexec/smart.sh
+++ b/
roles/common/files/libexec/smart.sh
@@
-70,8
+70,8
@@
main ()
# Nagios reads and displays the first line of output on the Services page.
# All individual messages about failed/failing disk statistics can be viewed
# on the individual system's SMART detail page in nagios.
- for msg in "${messages[@]}"
- do
+ readarray -t sorted < <(for msg in "${messages[@]}"; do echo "$msg"; done | sort)
+
for msg in "${sorted[@]}";
do
echo "$msg"
done