say that stopping and coming back costs nothing
Choosing option 1 means leaving to set up a server elsewhere, which could take an afternoon. The run now says outright that Ctrl-C is fine and that returning picks up here — completed steps skipped, answers kept — so nobody feels they have to finish in one sitting or start over. The same promise once at the top, where the resume notice already was. That notice is now phrased as what it means rather than as file paths: "2 step(s) already done, and they will be skipped", with the command to start over instead of a bare mention of the file. On the question of why pre-flight kept re-asking: it does not, and I caused what you saw. Nearly every test command I have run today ended with `sudo rm -f .setup-answers`, so the file was deleted between your runs. Proved the round trip — a run with the variables set writes all three, and a second run with no environment at all asks nothing and prints what it remembered. The file is gitignored, so there was never a reason to be deleting it. Stopped. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -108,10 +108,15 @@ ask_machine_role
|
||||
info "Role: ${MACHINE_ROLE}"
|
||||
|
||||
if [[ -f "$PROGRESS_FILE" ]]; then
|
||||
DONE_COUNT=$(wc -l < "$PROGRESS_FILE")
|
||||
echo -e "${YELLOW} Resuming — $DONE_COUNT step(s) already completed${NC}"
|
||||
echo -e "${YELLOW} Progress file: $PROGRESS_FILE${NC}"
|
||||
echo -e "${YELLOW} To start fresh: rm $PROGRESS_FILE${NC}"
|
||||
DONE_COUNT=$(wc -l <"$PROGRESS_FILE")
|
||||
echo ""
|
||||
info "Resuming — ${DONE_COUNT} step(s) already done, and they will be skipped"
|
||||
echo " To start over instead: sudo rm ${PROGRESS_FILE}"
|
||||
else
|
||||
echo ""
|
||||
echo " This can be stopped at any point and run again later. Completed"
|
||||
echo " steps are remembered and skipped, and the answers below are kept,"
|
||||
echo " so coming back costs nothing."
|
||||
fi
|
||||
|
||||
if [[ "$EUID" -ne 0 ]]; then
|
||||
@@ -466,6 +471,12 @@ if ! skip; then
|
||||
echo ""
|
||||
echo " Then come back here with its address and a key. Nothing below"
|
||||
echo " will work until that server is up and answering."
|
||||
echo ""
|
||||
echo " Take as long as you need. Stop this script whenever you like"
|
||||
echo " — Ctrl-C is fine — and run it again when you are ready. Every"
|
||||
echo " step already done is remembered and skipped, and the answers"
|
||||
echo " you have given are kept, so you will come back to this same"
|
||||
echo " question and nothing before it."
|
||||
fi
|
||||
# No default offered. A coordination server URL is somebody's private
|
||||
# infrastructure, and a machine that joins the wrong one has joined a
|
||||
|
||||
Reference in New Issue
Block a user