fixed detect HDD size

This commit is contained in:
rootzoll 2019-02-13 02:33:27 +01:00
parent db77299b0c
commit 4ccdd8bb22
7 changed files with 11 additions and 9 deletions

View File

@ -1,5 +1,8 @@
#!/bin/bash
## get basic info
source /home/admin/raspiblitz.info 2>/dev/null
echo ""
echo "*** Checking if HDD is connected ***"
sleep 5
@ -40,7 +43,6 @@ if [ ${existsHDD} -eq 1 ]; then
minSize=31000000000
fi
isSize=$(lsblk -o NAME,SIZE -b | grep "${device}" | awk '$1=$1' | cut -d " " -f 2)
echo "isSize(${num1Kblocks})"
if [ ${isSize} -lt ${minSize} ]; then
if [ ${isSize} -gt 1 ]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"

View File

@ -1,7 +1,7 @@
#!/bin/bash
## get basic info
source /home/admin/raspiblitz.info 2>/dev/null
source /home/admin/raspiblitz.info
echo ""
echo "*** Check 1st HDD ***"

View File

@ -1,7 +1,7 @@
#!/bin/bash
## get basic info
source /home/admin/raspiblitz.info 2>/dev/null
source /home/admin/raspiblitz.info
# get local ip
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')

View File

@ -1,6 +1,9 @@
#!/bin/bash
echo ""
## get basic info
source /home/admin/raspiblitz.info
# *** BITCOIN (just mainnet) ***
bitcoinList="" # url to list with other sources
#bitcoinUrl="ftp://anonymous:anonymous@91.83.237.185:21/raspiblitz-bitcoin-2018-07-16"
@ -15,9 +18,6 @@ litecoinSize=22220000 # 22221160-tolerance
# NOTE TO GET THE SIZE RIGHT: for new download add 9999999999 as size. Run download.
# When finished the warning comes up and behind WARNING: copy that number
## get basic info
source /home/admin/raspiblitz.info 2>/dev/null
# settings based on network
list=$bitcoinList
url=$bitcoinUrl

View File

@ -1,7 +1,7 @@
#!/bin/bash
## get basic info
source /home/admin/raspiblitz.info 2>/dev/null
source /home/admin/raspiblitz.info
# only show warning when bitcoin
if [ "$network" = "bitcoin" ]; then

View File

@ -5,7 +5,7 @@ echo ""
# why there are two torrent files
## get basic info
source /home/admin/raspiblitz.info 2>/dev/null
source /home/admin/raspiblitz.info
# make sure rtorrent is available
sudo apt-get install rtorrent -y

View File

@ -2,7 +2,7 @@
echo ""
## get basic info
source /home/admin/raspiblitz.info 2>/dev/null
source /home/admin/raspiblitz.info
echo "*** Checking HDD ***"
mountOK=$(df | grep -c /mnt/hdd)