Repository navigation
Installer: a first-install mode answer no longer discards a forced --netboot-proto - #2066
Merged
fog-workflows[bot] merged 1 commit intoNov 4, 2026
Merged
Conversation
…netboot-proto installfog.sh clears FOG_install_mode when a discrete transport flag is given, but promptInstallMode still runs with --netboot-proto and recorded its answer unconditionally. The next run seeded that mode, _applyInstallMode wrote the preset's BOOT_url_proto, and _resolveNetbootProto kept it because BOOT_url_proto_forced was yes. The forced protocol was lost for good. Both call sites now record through _recordInstallMode. For --netboot-proto it clears the mode only when the forced value differs from the preset's: a matching value moves nothing, and clearing then would lose http-only, whose HTTP web UI lives only in the mode name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On a first interactive install with
--netboot-proto <x>and no other mode flag, the install-mode prompt still runs. It recorded its answer asFOG_install_modeunconditionally, overriding the installer's rule that a discrete transport flag clears the mode. On the next run the installer seeded that mode,_applyInstallModewrote the preset'sBOOT_url_proto, and_resolveNetbootProtokept it becauseBOOT_url_proto_forcedwas stillyes. The forced netboot protocol was lost for good.Found while working on #2064 / #2065.
Change
_recordInstallMode()inlib/common/functions.sh.bin/installfog.shandpromptInstallModeboth call it.--netboot-proto, the rule clears the mode only when the forced value differs from the preset's. A matching value moves nothing. Clearing then would lose http-only, whose HTTP web UI is recorded only in the mode name.Behavior change on the flag path:
--install-mode X --netboot-proto Y, whereYequals the preset's netboot value, now keeps the mode instead of clearing it. The next run produces the same keys either way. For http-only it also keeps the HTTP web UI, which it used to lose.Tests
tests/install-settings-resolution.test.sh:httpkeeps both the mode and the HTTP web UI.promptInstallModerecords through_recordInstallMode.Each new check was made to fail by reintroducing the old behavior. A simulation of every prompt answer (1-4) with each forced value (
http,https) keeps the forced netboot value on the second run in all 8 cases.Not in this PR
--netboot-proto httpsstill clears the mode, so the web UI returns to https on the next run. The flag path already did this before this change, and the shape contradicts itself. A comment in_recordInstallModenames it.--netboot-proto <x>sets it and clears the mode.🤖 Generated with Claude Code