diff options
Diffstat (limited to 'monitor_soft_raid')
-rwxr-xr-x | monitor_soft_raid | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/monitor_soft_raid b/monitor_soft_raid index fc86d3a..1dc7da4 100755 --- a/monitor_soft_raid +++ b/monitor_soft_raid @@ -1,6 +1,7 @@ #!/bin/zsh +T="[$(printf 'U%.0s' {1..$1})]" S=$(awk '/^md/ {printf "%s: ", $1}; /blocks/ {print $NF}' </proc/mdstat) STATUS=$(echo $S | cut -d" " -f2) -if [[ $STATUS != "[UUUU]" ]]; then logger "[mdstat warning] $S"; fi +if [[ $STATUS != $T ]]; then logger "[mdstat warning] $S"; fi |