From a2c5ec0ec5be9ae0959588afda1abbaabcc0ee16 Mon Sep 17 00:00:00 2001 From: Nils Date: Fri, 12 Mar 2021 13:37:51 +0100 Subject: [PATCH] fix mdstat detection error --- stocheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stocheck.sh b/stocheck.sh index 2caaff9..f37baca 100755 --- a/stocheck.sh +++ b/stocheck.sh @@ -17,7 +17,7 @@ fi while [ -z "$1" ]; do raidcheck="$(lspci | grep -E 'LSI|3ware|Adaptec|Smartraid')" if [[ -z "$raidcheck" ]];then - if [[ -n $(ls /proc | grep -e "mdstat") ]];then + if [[ -n $(ls /proc | grep -e "mdstat") ]] && [[ -n $(grep -e "md" /proc/mdstat) ]];then raidlist=$(grep -e "md" /proc/mdstat | cut -d " " -f 1) raidlist2=$(echo "$raidlist" | wc -l) df=$(df -Th)