From e16424dcf526e764ec9960598423f02833eb3ee3 Mon Sep 17 00:00:00 2001 From: Nils <32552517+byReqz@users.noreply.github.com> Date: Sun, 24 Jan 2021 22:36:32 +0000 Subject: [PATCH] further tweak controller detection --- stocheck.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stocheck.sh b/stocheck.sh index ac0e66a..c1318a7 100644 --- a/stocheck.sh +++ b/stocheck.sh @@ -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