distro/rhel86: ensure grub2.Config.Default is preserved
The `grub2.Config.Default` key is owned by `NewGrub2StageOptions` and thus needs to be preserved in case there is a `Grub2Config` setting present in the image configuration (`ImageConfig`).
This commit is contained in:
parent
96411158e6
commit
55b7b82714
1 changed files with 7 additions and 0 deletions
|
|
@ -557,6 +557,13 @@ func osPipeline(t *imageType,
|
|||
|
||||
if cfg := imageConfig.Grub2Config; cfg != nil {
|
||||
if grub2, ok := bootloader.Options.(*osbuild.GRUB2StageOptions); ok {
|
||||
|
||||
// grub2.Config.Default is owned and set by `NewGrub2StageOptions`
|
||||
// and thus we need to preserve it
|
||||
if grub2.Config != nil {
|
||||
cfg.Default = grub2.Config.Default
|
||||
}
|
||||
|
||||
grub2.Config = cfg
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue