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

fix broken if

This commit is contained in:
Nils 2021-01-23 23:42:16 +00:00 committed by GitHub
parent 6400e12a80
commit 14d1f42a38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,7 @@ while [ ! -n "$1" ]; do
echo "-------------------------------------------------" echo "-------------------------------------------------"
fi fi
done done
fi
if [[ -n $(ls /dev | grep nvme) ]];then if [[ -n $(ls /dev | grep nvme) ]];then
echo "=== nvme drive check: ===" echo "=== nvme drive check: ==="
for x in {0..4};do for x in {0..4};do
@ -30,10 +31,11 @@ while [ ! -n "$1" ]; do
echo "---------------------------------------------------" echo "---------------------------------------------------"
fi fi
done done
else fi
if [[ -n $(ls /dev | grep nvme) ]] || if [[ -n $(ls /sys/block | grep sd) ]];then
exit exit
fi fi
fi fi
if [[ "$raidcheck" =~ "3ware" ]];then if [[ "$raidcheck" =~ "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)
@ -83,6 +85,7 @@ while [ ! -n "$1" ]; do
fi fi
#adding further controllers here #adding further controllers here
fi fi
done
while [ ! -z "$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
@ -105,5 +108,3 @@ while [ ! -z "$1" ]; do
exit exit
fi fi
done done
fi
done