From 71f0a89dcaf76250cb1ba9637bea26a446d2ba94 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Wed, 15 Dec 2021 00:10:37 -0500 Subject: [PATCH] Respawn instead of reboot if script fails --- templates/install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/templates/install.sh b/templates/install.sh index 7b6c2ea..76016c6 100755 --- a/templates/install.sh +++ b/templates/install.sh @@ -118,9 +118,9 @@ cleanup() { if [[ -z ${DONE} ]]; then case ${install_option} in on) - echo "A fatal error occurred; rebooting in 30 seconds. Press any key to spawn a shell." - if ! read -t 30; then - reboot + echo "A fatal error occurred!; restarting installer in 15 seconds. Press any key to spawn a shell." + if ! read -t 15; then + exec ${0} fi ;; *) @@ -967,6 +967,7 @@ DONE="y" seed_postinst() { cleanup echo "Temporary root password: ${root_password}" + echo seed_checkin end echo "Rebooting in 10 seconds."