From 2a20703a687614e192c852ab198e88520adda908 Mon Sep 17 00:00:00 2001 From: Marketen Date: Tue, 20 Oct 2026 11:53:30 +0200 Subject: [PATCH] Keep the first-boot test result visible until someone answers Boot messages (systemd status lines, cloud-init key output) keep printing on the console the first-boot test uses, and bury its single "Press enter to continue" prompt, so a finished install looks stuck. Repeat the result every 30 seconds until Enter is pressed, and say that rebooting works too: the test removes .firstboot before prompting, so the next boot starts DAppNode either way. Input or EOF still ends the wait. Co-Authored-By: Claude Opus 5.5 --- scripts/dappnode_test_install.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/scripts/dappnode_test_install.sh b/scripts/dappnode_test_install.sh index 56804f0..a4dd1c2 100755 --- a/scripts/dappnode_test_install.sh +++ b/scripts/dappnode_test_install.sh @@ -74,9 +74,24 @@ for img in $imgs; do fi done +# Boot messages keep printing on this console and can bury a single prompt, so +# repeat the result until someone answers. Rebooting is just as good as Enter. +wait_for_user() { + local result=$1 + local status + while true; do + echo -e "\n${result}" + echo "Press Enter to continue, or reboot the machine (e.g. sudo reboot) to start DAppNode." + read -r -t 30 + status=$? + # Only a timeout (status > 128) repeats the prompt; input or EOF ends it. + [ "${status}" -gt 128 ] || break + done +} + rm -f /usr/src/dappnode/.firstboot if [ "${#corrupted_imgs[@]}" -gt 0 ]; then - read -r -p "Test completed with corrupted images: ${corrupted_imgs[*]}. Press enter to continue" + wait_for_user "\e[31mTest completed with corrupted images: ${corrupted_imgs[*]}\e[0m" else - read -r -p "Test completed successfully. Press enter to continue" + wait_for_user "\e[32mTest completed successfully.\e[0m" fi