1
0
mirror of https://github.com/byReqz/stocheck.git synced 2024-12-26 19:01:47 +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 ""
fi
while [ ! -n "$1" ]; do
raidcheck="$(lspci)"
while [ -z "$1" ]; do
raidcheck="$(lspci | grep -E 'lsi|3ware|adaptec|smartraid')"
if [[ -z "$raidcheck" ]];then
if [[ -n $(ls /sys/block | grep sd) ]];then
echo "=== sata drive check: ==="
@ -138,8 +138,7 @@ while [ ! -n "$1" ]; do
exit
fi
done
exit
while [ ! -z "$1" ]; do
while [ -n "$1" ]; do
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
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 " -h/--help -- show help"
exit
else
echo "Usage: $0 (options) <ip> (y/n)"
echo "Options:"
echo " -u/--update -- update the script"
echo " -h/--help -- show help"
exit
fi
done
done