Skip to content

OSModifier: Refactor boot customization to handle both GRUB and UKI scenarios#269

Merged
elainezhao1 merged 5 commits into
mainfrom
user/elaine/emu-selinux
Jun 13, 2025
Merged

OSModifier: Refactor boot customization to handle both GRUB and UKI scenarios#269
elainezhao1 merged 5 commits into
mainfrom
user/elaine/emu-selinux

Conversation

@elainezhao1
Copy link
Copy Markdown
Contributor

@elainezhao1 elainezhao1 commented Jun 10, 2025

a follow up for #266
Enhance boot customization logic to distinguish GRUB and UKI scenarios

  • Introduce explicit checks for /boot/grub2/grub.cfg and /etc/default/grub to determine if GRUB is in use.
  • Conditionally apply GRUB-specific logic (e.g., kernel command line updates, SELinux boot parameters) only when GRUB is present.
  • Refactor SELinux handling into updateSELinuxForGrubBasedBoot and updateSELinuxForUkiBoot for clarity and separation of concerns.

Checklist

  • Tests added/updated
  • Documentation updated (if needed)
  • Code conforms to style guidelines

Comment thread toolkit/tools/pkg/osmodifierlib/modifierutils.go
@elainezhao1 elainezhao1 marked this pull request as ready for review June 11, 2025 19:34
@elainezhao1 elainezhao1 requested a review from a team as a code owner June 11, 2025 19:34
Comment thread toolkit/tools/pkg/osmodifierlib/modifierutils.go Outdated
Comment thread toolkit/tools/pkg/osmodifierlib/modifierutils.go Outdated
Comment thread toolkit/tools/pkg/osmodifierlib/modifierutils.go Outdated
Comment thread toolkit/tools/pkg/osmodifierlib/modifierutils.go Outdated
Comment thread toolkit/tools/pkg/osmodifierlib/modifierutils.go Outdated
@elainezhao1 elainezhao1 changed the title OSModifier: Add boot type detection OSModifier: Refactor boot customization to handle both GRUB and UKI scenarios Jun 12, 2025
@elainezhao1 elainezhao1 merged commit e52c457 into main Jun 13, 2025
8 checks passed
@elainezhao1 elainezhao1 deleted the user/elaine/emu-selinux branch June 13, 2025 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants