install: support grub2/30_console.cfg for console replacement#1360
Merged
prestist merged 1 commit intocoreos:mainfrom Dec 15, 2023
Merged
install: support grub2/30_console.cfg for console replacement#1360prestist merged 1 commit intocoreos:mainfrom
prestist merged 1 commit intocoreos:mainfrom
Conversation
00e27f2 to
93ef156
Compare
cgwalters
approved these changes
Dec 15, 2023
| path = mountpoint.join(name); | ||
| } | ||
| let grub_cfg = fs::read_to_string(&path).context(format!("reading {}", name))?; | ||
| let new_grub_cfg = update_grub_cfg_console_settings(&grub_cfg, &grub_commands) |
Member
There was a problem hiding this comment.
Very very minor but style is usually to use .with_context(|| format!(...)) to avoid string allocation even on non-error paths.
Member
Author
There was a problem hiding this comment.
ok I updated it.. shamefully I know very little about rust, but have been meaning to change that for a long time :(
93ef156 to
5d31c06
Compare
Upstream we are starting to use grub configs that are partially baked into bootupd [1] and partially baked into the image via the OS vendor (in our case a grub2/30_console.cfg file [2]). Let's look first to see if grub2/30_console.cfg exists when trying to write new console settings before falling back to grub2/grub.cfg. [1] coreos/bootupd#543 [2] coreos/fedora-coreos-config#2769
5d31c06 to
9334eb7
Compare
Member
Author
|
local tests with this are looking good. |
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.
Upstream we are starting to use grub configs that are partially baked into bootupd [1] and partially baked into the image via the OS vendor (in our case a grub2/30_console.cfg file [2]). Let's look first to see if grub2/30_console.cfg exists when trying to write new console settings before falling back to grub2/grub.cfg.
[1] coreos/bootupd#543
[2] coreos/fedora-coreos-config#2769