From b6f4889ac5a621603a35fa57a11f8f8b2220ecad Mon Sep 17 00:00:00 2001 From: Jeremy Dubois Date: Thu, 22 Oct 2020 14:16:56 +0200 Subject: [PATCH] Fix check_raidok : the same device could be displayed multiple times --- evocheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evocheck.sh b/evocheck.sh index e9bbefb..b6c687e 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -121,7 +121,7 @@ check_raidok(){ egrep 'sd.*RAID' /var/run/dmesg.boot 1> /dev/null 2>&1 RESULT=$? if [ $RESULT -eq 0 ]; then - raid_device=$(egrep 'sd.*RAID' /var/run/dmesg.boot | awk '{ print $1 }') + raid_device=$(egrep 'sd.*RAID' /var/run/dmesg.boot | awk '{ print $1 }' | tail -1) raid_status=$(bioctl $raid_device | grep softraid | awk '{ print $3 }') if [ $raid_status != "Online" ]; then failed "IS_RAIDOK" "One of the RAID disk members is faulty. Use bioctl -h $raid_device for more informations"