From e0b44cfe9c39335125d8d24c634baa1dffd5b0b3 Mon Sep 17 00:00:00 2001 From: LinuxSquare Date: Sun, 25 Aug 2024 20:17:26 +0200 Subject: [PATCH] rework end-screen --- airootfs/root/install.sh | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/airootfs/root/install.sh b/airootfs/root/install.sh index 25b29d4..6e79388 100644 --- a/airootfs/root/install.sh +++ b/airootfs/root/install.sh @@ -450,17 +450,18 @@ EOT # remove shell histories rm -f /root/.zsh_history - dialog --stdout --clear --cr-wrap --no-collapse --yes-label "Reboot" --no-label "Alpine shell" --yesno "\n Installation finished" 7 50 - case $? in - 0) reboot ;; - 1) - clear - exit - ;; - 255) - clear - exit - ;; + selected_option=$(dialog --output-fd 1 --menu "What would you like to do?" 10 70 5 reboot "Reboot into your newly installed system" poweroff "Shut down the current live system" alpine-shell "Switch to an interactive shell") + case "$selected_option" in + "reboot") + reboot + ;; + "poweroff") + poweroff + ;; + "alpine-shell") + clear + exit + ;; esac }