script improvements
This commit is contained in:
+17
-12
@@ -228,15 +228,20 @@ case "$INSTALL_LEVEL" in
|
||||
esac
|
||||
|
||||
say_green "Debian setup complete."
|
||||
say_red "The installation has finished. A reboot is recommended before continuing."
|
||||
read -rp "Reboot now? [y/N]: " reboot_choice
|
||||
case "${reboot_choice,,}" in
|
||||
y|yes)
|
||||
say_red "Rebooting now."
|
||||
sudo reboot
|
||||
;;
|
||||
*)
|
||||
say_yellow "Skipping reboot. Make sure to reboot manually before continuing upgrades."
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
say_red "The installation has finished. A reboot is recommended."
|
||||
# Reboots are dangerous to automate; we use a shorter timeout and default to No
|
||||
if read -t 10 -rp "Reboot now? [y/N]: " reboot_choice; then
|
||||
case "${reboot_choice,,}" in
|
||||
y|yes)
|
||||
say_red "Rebooting now."
|
||||
sudo reboot
|
||||
;;
|
||||
*)
|
||||
say_yellow "Skipping reboot."
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
else
|
||||
say_yellow "\nNo input detected. Skipping reboot for safety."
|
||||
exit 0
|
||||
fi
|
||||
Reference in New Issue
Block a user