move ssh repair after network available

This commit is contained in:
rootzoll 2021-08-20 18:38:16 +02:00
parent b7bda4c744
commit 2172de1b55

View file

@ -94,9 +94,6 @@ sudo chmod 777 ${infoFile}
###################################### ######################################
# CHECK SD CARD INCONSISTENT STATE # CHECK SD CARD INCONSISTENT STATE
# make sure SSH server is configured & running
sudo /home/admin/config.scripts/blitz.ssh.sh checkrepair >> $logFile
# when the provision did not ran thru without error (ask user for fresh sd card) # when the provision did not ran thru without error (ask user for fresh sd card)
provisionFlagExists=$(sudo ls /home/admin/provision.flag | grep -c 'provision.flag') provisionFlagExists=$(sudo ls /home/admin/provision.flag | grep -c 'provision.flag')
if [ "${provisionFlagExists}" == "1" ]; then if [ "${provisionFlagExists}" == "1" ]; then
@ -324,7 +321,6 @@ fi
# WAIT LOOP: LOCALNET / INTERNET # WAIT LOOP: LOCALNET / INTERNET
# after HDD > can contain WIFI conf # after HDD > can contain WIFI conf
################################### ###################################
gotLocalIP=0 gotLocalIP=0
until [ ${gotLocalIP} -eq 1 ] until [ ${gotLocalIP} -eq 1 ]
do do
@ -358,6 +354,9 @@ do
sleep 1 sleep 1
done done
# make sure SSH server is configured & running
sudo /home/admin/config.scripts/blitz.ssh.sh checkrepair >> $logFile
# write info for LCD # write info for LCD
sed -i "s/^state=.*/state=inspect-hdd/g" ${infoFile} sed -i "s/^state=.*/state=inspect-hdd/g" ${infoFile}
sed -i "s/^message=.*/message='please wait'/g" ${infoFile} sed -i "s/^message=.*/message='please wait'/g" ${infoFile}