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:
parent
d09bec4186
commit
73cdf4f2bd
13
stocheck.sh
13
stocheck.sh
@ -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
|
Loading…
Reference in New Issue
Block a user