mirror of
https://github.com/byReqz/stocheck.git
synced 2024-11-22 06:41:14 +00:00
fix detection and loop issue
This commit is contained in:
parent
fb8815d107
commit
03c6051ba3
@ -106,13 +106,8 @@ while [ -z "$1" ]; do
|
||||
echo "------------------- /dev/sd"$x" --------------------"
|
||||
echo -e "drive is not responding"
|
||||
echo "-------------------------------------------------"
|
||||
else
|
||||
exit
|
||||
fi
|
||||
done
|
||||
if [[ -z $(ls /dev | grep nvme) ]];then
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
if [[ -n $(ls /dev | grep nvme) ]];then
|
||||
echo "=== nvme drive check: ($(ls -l /sys/block | grep nvme | wc -l) found) ==="
|
||||
@ -150,14 +145,12 @@ while [ -z "$1" ]; do
|
||||
echo "-------------------------------------------------"
|
||||
fi
|
||||
done
|
||||
if [[ -z $(ls /dev | grep sd) ]];then
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
if [[ -n $(ls /sys/block | grep nvme) ]] || [[ -n $(ls /sys/block | grep sd) ]] || [[ ! "$raidcheck" =~ "3ware" ]] && [[ "$raidcheck" =~ "adaptec" ]] && [[ "$raidcheck" =~ "lsi" ]] && [[ -n $(ls /sys/block | grep sd) ]] && [[ -n $(ls /dev | grep nvme) ]];then
|
||||
echo "no drives detected"
|
||||
exit
|
||||
fi
|
||||
exit
|
||||
elif [[ -n $(echo "$raidcheck" | grep -e "3ware") ]];then
|
||||
echo "3ware raid-controller detected"
|
||||
dreiware=$(tw_cli show | grep c | cut -c -3)
|
||||
|
Loading…
Reference in New Issue
Block a user