1
0
mirror of https://github.com/byReqz/stocheck.git synced 2024-11-16 12:43:13 +00:00

further tweak controller detection

This commit is contained in:
Nils 2021-01-24 22:36:32 +00:00 committed by GitHub
parent c71fd842e7
commit e16424dcf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,7 @@ while [ -z "$1" ]; do
echo "no drives detected"
exit
fi
elif [[ "$raidcheck" =~ "3ware" ]];then
elif [[ -n $(echo "$raidcheck" | grep -e "3Ware") ]];then
echo "3ware raid-controller detected"
dreiware=$(tw_cli show | grep c | cut -c -3)
echo "------------------- 3ware controller: $dreiware --------------------"
@ -97,7 +97,7 @@ while [ -z "$1" ]; do
echo "reading smart values for this controller series is not supported"
exit
fi
elif [[ "$raidcheck" =~ "adaptec" ]];then
elif [[ -n $(echo "$raidcheck" | grep -e "Adaptec") ]];then
echo "adaptec raid-controller detected"
echo "------------------- adaptec controller --------------------"
arcconf GETCONFIG 1 LD
@ -115,7 +115,7 @@ while [ -z "$1" ]; do
exit
fi
done
elif [[ "$raidcheck" =~ "lsi" ]];then
elif [[ -n $(echo "$raidcheck" | grep -e "LSI") ]];then
echo "lsi raid-controller detected"
echo "------------------- adaptec controller --------------------"
megacli -LDInfo -Lall -Aall