Skip to content

Commit b44b06c

Browse files
committed
Explain the OPNsense console answers and report the console wait honestly
The keystroke sequence was replayed against setaddr.php: the extra n covers the WAN-tracking prompt that only appears when WAN has DHCP6, and OPNsense re-asks the IPv6 address where it is absent, so every branch ends in the intended state. The wait message now says whether the console settled instead of warning after every run.
1 parent 111a33e commit b44b06c

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

‎vm/opnsense-vm.sh‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ fi
441441
msg_ok "Bridge interfaces have been successfully added."
442442

443443
msg_ok "Created a OPNsense VM ${CL}${BL}(${HN})"
444-
msg_ok "Starting OPNsense VM (Patience this takes 20-30 minutes)"
444+
msg_ok "Starting OPNsense VM (the bootstrap takes 10-30 minutes)"
445445
$STD qm start $VMID
446446
sleep 90
447447
send_line_to_vm "root"
@@ -512,7 +512,16 @@ while [ $build_stable -lt 6 ] && [ $build_elapsed -lt 2400 ]; do
512512
break
513513
fi
514514
done
515-
msg_warn "Console wait ended after $((build_elapsed / 60)) minutes; a static screen does not prove installation succeeded. Verify the OPNsense console."
515+
if [ $build_stable -ge 6 ]; then
516+
msg_ok "OPNsense console settled after $((build_elapsed / 60)) minutes"
517+
else
518+
msg_warn "The console did not settle within $((build_elapsed / 60)) minutes; continuing, verify the OPNsense console afterwards"
519+
fi
520+
# The answers below are matched to OPNsense's console dialog (setaddr.php).
521+
# One prompt ("via WAN tracking?") only appears when WAN has DHCP6, so a spare
522+
# "n" is sent for it; where it is absent, OPNsense re-asks the IPv6 address and
523+
# the following ENTER lands there. Invalid answers are re-asked, empty ones take
524+
# the default, which keeps the sequence safe in both dialog variants.
516525
send_line_to_vm "root"
517526
send_line_to_vm "opnsense"
518527
send_line_to_vm "2"

0 commit comments

Comments
 (0)