detect no HDD in beginning

This commit is contained in:
rootzoll 2019-12-14 16:06:28 +01:00
parent 696491b923
commit 3d0ed38936

View File

@ -7,6 +7,22 @@ configFile="/mnt/hdd/raspiblitz.conf"
# INFOFILE - state data from bootstrap
infoFile="/home/admin/raspiblitz.info"
# use blitz.datadrive.sh to analyse HDD situation
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh status)
if [ ${#error} -gt 0 ]; then
echo "# FAIL blitz.datadrive.sh status --> ${error}"
echo "# Please report issue to the raspiblitz github."
exit 1
fi
# check if HDD is connected
if [ ${isMounted} -eq 0 ] && [ ${#hddCandidate} -eq 0 ]; then
echo "***********************************************************"
echo "WARNING: NO HDD FOUND -> Shutdown, connect HDD and restart."
echo "***********************************************************"
exit
fi
# check data from _bootstrap.sh that was running on device setup
bootstrapInfoExists=$(ls $infoFile | grep -c '.info')
if [ ${bootstrapInfoExists} -eq 0 ]; then