Browse Source

freshly recovered flag

dev
rootzoll 6 years ago
parent
commit
1a6944bf3d
  1. 2
      home.admin/00mainMenu.sh
  2. 15
      home.admin/_bootstrap.sh

2
home.admin/00mainMenu.sh

@ -39,6 +39,8 @@ fi
if [ "${state}" = "recovered" ]; then
echo "System recovered - needs final user settings"
./20recoverDialog.sh
# remove flag that freshly recovered
sudo rm /home/admin/raspiblitz.recover.info
exit 1
fi

15
home.admin/_bootstrap.sh

@ -175,6 +175,8 @@ if [ ${hddIsAutoMounted} -eq 0 ]; then
sed -i "s/^state=.*/state=recovered/g" ${infoFile}
sed -i "s/^message=.*/message='Done Recover'/g" ${infoFile}
echo "rebooting" >> $logFile
# set flag that system is freshly recovered and needs setup dialogs
echo "state=recovered" >> /home/admin/raspiblitz.recover.info
# save log file for inspection before reboot
cp $logFile /home/admin/raspiblitz.recover.log
sudo shutdown -r now
@ -265,11 +267,22 @@ if [ ${configExists} -eq 1 ]; then
fi
################################
# DETECT FRESHLY RECOVERED SD
################################
recoveredInfoExists=$(ls /home/admin/raspiblitz.recover.info | grep -c '.info')
if [ ${configExists} -eq 1 ]; then
sed -i "s/^state=.*/state=recovered/g" ${infoFile}
sed -i "s/^message=.*/message='login to finish'/g" ${infoFile}
exit 0
fi
################################
# SD INFOFILE BASICS
################################
sed -i "s/^state=.*/state=ready/g" ${infoFile}
sed -i "s/^state=.*/state=recovered/g" ${infoFile}
sed -i "s/^message=.*/message='waiting login'/g" ${infoFile}
echo "DONE BOOTSTRAP" >> $logFile
exit 0
Loading…
Cancel
Save