projects
/
gnt-info
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
900fe5a
)
Merge remote-tracking branch 'lib15/lib15'
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 14 Jan 2018 13:46:11 +0000
(14:46 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 14 Jan 2018 13:46:11 +0000
(14:46 +0100)
smart-megaraid.sh
patch
|
blob
|
history
diff --git
a/smart-megaraid.sh
b/smart-megaraid.sh
index
8113f58
..
3af5819
100755
(executable)
--- a/
smart-megaraid.sh
+++ b/
smart-megaraid.sh
@@
-7,7
+7,10
@@
pattern='^# 1'
test ! -z "$1" && pattern=$1
+did_megaraid=0
+
megaraid() {
+ test $did_megaraid -eq 1 && return
drive=$1
nr=0
while [ $nr -lt 8 ] ; do
@@
-15,6
+18,7
@@
megaraid() {
smartctl -d megaraid,$nr -a /dev/$drive > /dev/shm/smart.$drive.$nr
nr=`expr $nr + 1`
done
+ did_megaraid=1
}
test -r /proc/mdstat && cat /proc/mdstat