add end dialog on setup leaving

This commit is contained in:
Tobias Powalowski 2023-06-15 21:33:09 +02:00
parent 03c71882b0
commit 861a15316a

View file

@ -321,15 +321,28 @@ _mainmenu() {
"7") "7")
_install_bootloader ;; _install_bootloader ;;
"8") "8")
[[ -e /tmp/.setup-running ]] && rm /tmp/.setup-running dialog ${_DEFAULT} --title " EXIT PROGRAM " --menu 11 58 8 \
clear "1" "Exit Program" \
if mountpoint -q /install; then "2" "Reboot System" \
echo "" "3" "Poweroff System" 2>${_ANSWER}
echo "If the installation finished successfully, you can now type 'reboot'" _ANSWER="$(cat ${_ANSWER})"
echo "to restart the system." if [[ "${_ANSWER}" == "1" ]]; then
echo "" [[ -e /tmp/.setup-running ]] && rm /tmp/.setup-running
clear
if mountpoint -q /install; then
echo ""
echo "If the installation finished successfully:"
echo "Remove the boot medium and type 'reboot'"
echo "to restart the system."
echo ""
fi
exit 0
elif [[ "${_ANSWER}" == "2" ]]; then
reboot
elif "[[ ${_ANSWER}" == "3" ]]; then
poweroff
fi fi
exit 0 ;; ;;
*) *)
if _dialog --yesno "Abort Program?" 6 40; then if _dialog --yesno "Abort Program?" 6 40; then
[[ -e /tmp/.setup-running ]] && rm /tmp/.setup-running [[ -e /tmp/.setup-running ]] && rm /tmp/.setup-running