1
0
mirror of https://github.com/byReqz/stocheck.git synced 2024-11-22 14:41:15 +00:00

fix mdstat detection error

This commit is contained in:
Nils 2021-03-12 13:37:51 +01:00
parent 10a7da4f73
commit a2c5ec0ec5
Signed by: byreqz
GPG Key ID: 396A62D7D436749E

View File

@ -17,7 +17,7 @@ fi
while [ -z "$1" ]; do while [ -z "$1" ]; do
raidcheck="$(lspci | grep -E 'LSI|3ware|Adaptec|Smartraid')" raidcheck="$(lspci | grep -E 'LSI|3ware|Adaptec|Smartraid')"
if [[ -z "$raidcheck" ]];then 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) raidlist=$(grep -e "md" /proc/mdstat | cut -d " " -f 1)
raidlist2=$(echo "$raidlist" | wc -l) raidlist2=$(echo "$raidlist" | wc -l)
df=$(df -Th) df=$(df -Th)