Fix check_raidok : the same device could be displayed multiple times
This commit is contained in:
parent
b49a1fbea5
commit
b6f4889ac5
|
@ -121,7 +121,7 @@ check_raidok(){
|
||||||
egrep 'sd.*RAID' /var/run/dmesg.boot 1> /dev/null 2>&1
|
egrep 'sd.*RAID' /var/run/dmesg.boot 1> /dev/null 2>&1
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
if [ $RESULT -eq 0 ]; then
|
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 }')
|
raid_status=$(bioctl $raid_device | grep softraid | awk '{ print $3 }')
|
||||||
if [ $raid_status != "Online" ]; then
|
if [ $raid_status != "Online" ]; then
|
||||||
failed "IS_RAIDOK" "One of the RAID disk members is faulty. Use bioctl -h $raid_device for more informations"
|
failed "IS_RAIDOK" "One of the RAID disk members is faulty. Use bioctl -h $raid_device for more informations"
|
||||||
|
|
Loading…
Reference in a new issue