mirror of
https://github.com/byReqz/stocheck.git
synced 2024-11-22 14:41:15 +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 "------------------- /dev/sd"$x" --------------------"
|
||||||
echo -e "drive is not responding"
|
echo -e "drive is not responding"
|
||||||
echo "-------------------------------------------------"
|
echo "-------------------------------------------------"
|
||||||
else
|
|
||||||
exit
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [[ -z $(ls /dev | grep nvme) ]];then
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
if [[ -n $(ls /dev | grep nvme) ]];then
|
if [[ -n $(ls /dev | grep nvme) ]];then
|
||||||
echo "=== nvme drive check: ($(ls -l /sys/block | grep nvme | wc -l) found) ==="
|
echo "=== nvme drive check: ($(ls -l /sys/block | grep nvme | wc -l) found) ==="
|
||||||
@ -150,14 +145,12 @@ while [ -z "$1" ]; do
|
|||||||
echo "-------------------------------------------------"
|
echo "-------------------------------------------------"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [[ -z $(ls /dev | grep sd) ]];then
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
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
|
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"
|
echo "no drives detected"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
exit
|
||||||
elif [[ -n $(echo "$raidcheck" | grep -e "3ware") ]];then
|
elif [[ -n $(echo "$raidcheck" | grep -e "3ware") ]];then
|
||||||
echo "3ware raid-controller detected"
|
echo "3ware raid-controller detected"
|
||||||
dreiware=$(tw_cli show | grep c | cut -c -3)
|
dreiware=$(tw_cli show | grep c | cut -c -3)
|
||||||
|
Loading…
Reference in New Issue
Block a user