mirror of
https://github.com/byReqz/stocheck.git
synced 2024-11-22 06:41:14 +00:00
fixed nvme drive counting
This commit is contained in:
parent
d82cef27df
commit
592bb244bc
@ -38,7 +38,7 @@ while [ -z "$1" ]; do
|
||||
if [[ -n $(ls /dev | grep nvme) ]];then
|
||||
echo "=== nvme drive check: ==="
|
||||
echo "-------------------------"
|
||||
echo "$(ls -l /dev | grep nvme | wc -l) Drives found"
|
||||
echo "$(ls -l /sys/block | grep nvme | wc -l) Drives found"
|
||||
echo "-------------------------"
|
||||
for x in {0..4};do
|
||||
scan=$(smartctl --scan)
|
||||
@ -57,7 +57,7 @@ while [ -z "$1" ]; do
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
if [[ -n $(ls /dev | 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
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user