mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-19 12:10:33 +02:00
improve setup dialog
This commit is contained in:
@@ -433,6 +433,10 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
|
||||
done
|
||||
|
||||
#############################################
|
||||
# PROVISION PROCESS
|
||||
#############################################
|
||||
|
||||
# temp mount the HDD
|
||||
echo "Temp mounting data drive ($hddCandidate)" >> $logFile
|
||||
if [ "${hddFormat}" != "btrfs" ]; then
|
||||
@@ -450,23 +454,46 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
sed -i "s/^message=.*/message='Starting Provision'/g" ${infoFile}
|
||||
#sed -i "s/^chain=.*/chain=${chain}/g" ${infoFile}
|
||||
#sed -i "s/^network=.*/network=${network}/g" ${infoFile}
|
||||
echo "Calling Data Migration .." >> $logFile
|
||||
echo "Calling Data Migration for possible updates .." >> $logFile
|
||||
sudo /home/admin/_bootstrap.update.sh
|
||||
echo "Calling Provisioning .." >> $logFile
|
||||
sudo /home/admin/_bootstrap.provision.sh
|
||||
sed -i "s/^state=.*/state=reboot/g" ${infoFile}
|
||||
sed -i "s/^state=.*/state=waitfinal/g" ${infoFile}
|
||||
sed -i "s/^message=.*/message='Done Provision'/g" ${infoFile}
|
||||
|
||||
# PROCESS raspiblitz.setup
|
||||
echo "TODO: After Provision Handling .." >> $logFile
|
||||
|
||||
# handle possible errors
|
||||
# set passwords
|
||||
# show seed words
|
||||
###################################################
|
||||
# WAIT LOOP: AFTER FRESH SETUP, MIFGRATION OR ERROR
|
||||
# successfull update & recover can skip this
|
||||
###################################################
|
||||
|
||||
until [ "${state}" == "waitfinal" ]
|
||||
do
|
||||
|
||||
# TODO: DETECT WHEN USER SETUP IS DONE
|
||||
echo "TODO: DETECT WHEN USER FINAL DIALOG IS DONE" >> $logFile
|
||||
|
||||
# handle possible errors
|
||||
# set passwords
|
||||
# show seed words
|
||||
|
||||
# get latest network info & update raspiblitz.info (in case network changes)
|
||||
source <(/home/admin/config.scripts/internet.sh status)
|
||||
sed -i "s/^localip=.*/localip='${localip}'/g" ${infoFile}
|
||||
|
||||
# give the loop a little bed time
|
||||
sleep 4
|
||||
|
||||
# check info file for updated values
|
||||
# especially the state for checking loop
|
||||
source ${infoFile}
|
||||
|
||||
done
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
echo "rebooting" >> $logFile
|
||||
echo "state=recovered" >> /home/admin/recover.flag
|
||||
echo "shutdown in 1min" >> $logFile
|
||||
|
@@ -30,7 +30,7 @@ case $CHOICE in
|
||||
# 2 --> SHUTDOWN
|
||||
clear
|
||||
echo "Shutting down without changes ..."
|
||||
echo "Cut power when you see no status LED action anymore."
|
||||
echo "Cut power when you see no status LED blinking anymore."
|
||||
exit 2
|
||||
;;
|
||||
*)
|
||||
|
@@ -79,12 +79,26 @@ elif [ "${eventID}" == "waitsetup" ] && [ "${mode}" == "lcd" ]; then
|
||||
backtitle="${backtitle} / (pre-synced)"
|
||||
fi
|
||||
|
||||
# custom welcomeline for this dialog
|
||||
welcomeline="Your RaspiBlitz is ready for Setup"
|
||||
if [ "${setupPhase}" == "update" ]; then
|
||||
welcomeline="RaspiBlitz is ready for Update"
|
||||
fi
|
||||
if [ "${setupPhase}" == "recovery" ]; then
|
||||
welcomeline="RaspiBlitz is ready for Recovery"
|
||||
fi
|
||||
if [ "${setupPhase}" == "migration" ]; then
|
||||
welcomeline="Ready for migration to RaspiBlitz"
|
||||
fi
|
||||
|
||||
# show default login help info
|
||||
dialog --backtitle "${backtitle}" --cr-wrap --infobox "
|
||||
Login to your RaspiBlitz with:
|
||||
${welcomeline}
|
||||
------------------------------------
|
||||
Use terminal command to login:
|
||||
ssh admin@${localip}
|
||||
Use password: raspiblitz
|
||||
" 7 41
|
||||
password: raspiblitz
|
||||
" 9 41
|
||||
|
||||
else
|
||||
|
||||
@@ -97,6 +111,14 @@ Use password: raspiblitz
|
||||
" 8 41
|
||||
fi
|
||||
|
||||
elif [ "${eventID}" == "waitfinal" ]; then
|
||||
|
||||
dialog --backtitle "${backtitle}" --cr-wrap --infobox "
|
||||
Setup-Done - Login for Details:
|
||||
ssh admin@${localip}
|
||||
Use your Password A
|
||||
" 7 41
|
||||
|
||||
elif [ "${eventID}" == "shutdown" ]; then
|
||||
|
||||
dialog --backtitle "${backtitle}" --cr-wrap --infobox "
|
||||
|
Reference in New Issue
Block a user