mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-21 14:11:06 +02:00
improve setup dialog
This commit is contained in:
@@ -433,6 +433,10 @@ if [ ${isMounted} -eq 0 ]; then
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
#############################################
|
||||||
|
# PROVISION PROCESS
|
||||||
|
#############################################
|
||||||
|
|
||||||
# temp mount the HDD
|
# temp mount the HDD
|
||||||
echo "Temp mounting data drive ($hddCandidate)" >> $logFile
|
echo "Temp mounting data drive ($hddCandidate)" >> $logFile
|
||||||
if [ "${hddFormat}" != "btrfs" ]; then
|
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/^message=.*/message='Starting Provision'/g" ${infoFile}
|
||||||
#sed -i "s/^chain=.*/chain=${chain}/g" ${infoFile}
|
#sed -i "s/^chain=.*/chain=${chain}/g" ${infoFile}
|
||||||
#sed -i "s/^network=.*/network=${network}/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
|
sudo /home/admin/_bootstrap.update.sh
|
||||||
echo "Calling Provisioning .." >> $logFile
|
echo "Calling Provisioning .." >> $logFile
|
||||||
sudo /home/admin/_bootstrap.provision.sh
|
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}
|
sed -i "s/^message=.*/message='Done Provision'/g" ${infoFile}
|
||||||
|
|
||||||
# PROCESS raspiblitz.setup
|
# PROCESS raspiblitz.setup
|
||||||
echo "TODO: After Provision Handling .." >> $logFile
|
echo "TODO: After Provision Handling .." >> $logFile
|
||||||
|
|
||||||
# handle possible errors
|
###################################################
|
||||||
# set passwords
|
# WAIT LOOP: AFTER FRESH SETUP, MIFGRATION OR ERROR
|
||||||
# show seed words
|
# 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
|
exit 0
|
||||||
|
|
||||||
|
|
||||||
echo "rebooting" >> $logFile
|
echo "rebooting" >> $logFile
|
||||||
echo "state=recovered" >> /home/admin/recover.flag
|
echo "state=recovered" >> /home/admin/recover.flag
|
||||||
echo "shutdown in 1min" >> $logFile
|
echo "shutdown in 1min" >> $logFile
|
||||||
|
@@ -30,7 +30,7 @@ case $CHOICE in
|
|||||||
# 2 --> SHUTDOWN
|
# 2 --> SHUTDOWN
|
||||||
clear
|
clear
|
||||||
echo "Shutting down without changes ..."
|
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
|
exit 2
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@@ -79,12 +79,26 @@ elif [ "${eventID}" == "waitsetup" ] && [ "${mode}" == "lcd" ]; then
|
|||||||
backtitle="${backtitle} / (pre-synced)"
|
backtitle="${backtitle} / (pre-synced)"
|
||||||
fi
|
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
|
# show default login help info
|
||||||
dialog --backtitle "${backtitle}" --cr-wrap --infobox "
|
dialog --backtitle "${backtitle}" --cr-wrap --infobox "
|
||||||
Login to your RaspiBlitz with:
|
${welcomeline}
|
||||||
|
------------------------------------
|
||||||
|
Use terminal command to login:
|
||||||
ssh admin@${localip}
|
ssh admin@${localip}
|
||||||
Use password: raspiblitz
|
password: raspiblitz
|
||||||
" 7 41
|
" 9 41
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
@@ -97,6 +111,14 @@ Use password: raspiblitz
|
|||||||
" 8 41
|
" 8 41
|
||||||
fi
|
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
|
elif [ "${eventID}" == "shutdown" ]; then
|
||||||
|
|
||||||
dialog --backtitle "${backtitle}" --cr-wrap --infobox "
|
dialog --backtitle "${backtitle}" --cr-wrap --infobox "
|
||||||
|
Reference in New Issue
Block a user