mirror of
https://github.com/eLvErDe/hwraid.git
synced 2025-07-27 07:44:01 +02:00
Rely on megaclisas-status exit code instead of output (Refs: #99)
This commit is contained in:
parent
dfe63bf478
commit
f40f5bcd6e
@ -47,11 +47,11 @@ check_megaclisas() {
|
|||||||
# Check ever $PERIOD seconds, send email on every status
|
# Check ever $PERIOD seconds, send email on every status
|
||||||
# change and repeat ever $REMIND seconds if the raid is still
|
# change and repeat ever $REMIND seconds if the raid is still
|
||||||
# bad.
|
# bad.
|
||||||
if (megaclisas-status --notemp) |grep -q 'NOT OPTIMAL' ; then
|
if (megaclisas-status --notemp); then
|
||||||
|
BADRAID=false
|
||||||
|
else
|
||||||
BADRAID=true
|
BADRAID=true
|
||||||
logger -t megaclisas-statusd "detected non-optimal RAID status"
|
logger -t megaclisas-statusd "detected non-optimal RAID status"
|
||||||
else
|
|
||||||
BADRAID=false
|
|
||||||
fi
|
fi
|
||||||
STATUSCHANGE=false
|
STATUSCHANGE=false
|
||||||
if [ true = "$BADRAID" ] ; then
|
if [ true = "$BADRAID" ] ; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user