-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
install: support grub2/30_console.cfg for console replacement #1360
Conversation
00e27f2
to
93ef156
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sane to me
name = "grub2/grub.cfg"; | ||
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very very minor but style is usually to use .with_context(|| format!(...))
to avoid string allocation even on non-error paths.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
local tests with this are looking good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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