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

fixed controller detection

This commit is contained in:
Nils 2021-01-24 20:47:09 +00:00 committed by GitHub
parent d09bec4186
commit 73cdf4f2bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,8 +7,8 @@ if [[ $(curl -s https://raw.githubusercontent.com/byReqz/stocheck/main/stocheck.
echo "#############################################" echo "#############################################"
echo "" echo ""
fi fi
while [ ! -n "$1" ]; do while [ -z "$1" ]; do
raidcheck="$(lspci)" raidcheck="$(lspci | grep -E 'lsi|3ware|adaptec|smartraid')"
if [[ -z "$raidcheck" ]];then if [[ -z "$raidcheck" ]];then
if [[ -n $(ls /sys/block | grep sd) ]];then if [[ -n $(ls /sys/block | grep sd) ]];then
echo "=== sata drive check: ===" echo "=== sata drive check: ==="
@ -138,8 +138,7 @@ while [ ! -n "$1" ]; do
exit exit
fi fi
done done
exit while [ -n "$1" ]; do
while [ ! -z "$1" ]; do
if [[ $1 == "-u" ]] || [[ "$1" == "--update" ]];then if [[ $1 == "-u" ]] || [[ "$1" == "--update" ]];then
if [[ $(curl -s https://raw.githubusercontent.com/byReqz/stocheck/main/stocheck.sh | md5sum | cut -c -32) != $(md5sum $0 | cut -c -32) ]];then if [[ $(curl -s https://raw.githubusercontent.com/byReqz/stocheck/main/stocheck.sh | md5sum | cut -c -32) != $(md5sum $0 | cut -c -32) ]];then
wget -O $0 --quiet "https://raw.githubusercontent.com/byReqz/stocheck/main/stocheck.sh" wget -O $0 --quiet "https://raw.githubusercontent.com/byReqz/stocheck/main/stocheck.sh"
@ -159,5 +158,11 @@ while [ ! -z "$1" ]; do
echo " -u/--update -- update the script" echo " -u/--update -- update the script"
echo " -h/--help -- show help" echo " -h/--help -- show help"
exit exit
else
echo "Usage: $0 (options) <ip> (y/n)"
echo "Options:"
echo " -u/--update -- update the script"
echo " -h/--help -- show help"
exit
fi fi
done done