Skip to content
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

fix: update-bls-cmdline is not supported on Amazon Linux 2023 #103

Closed
wants to merge 1 commit into from

Conversation

vchepkov
Copy link
Contributor

Pull Request (PR) description

This PR fixes incompatibility with Amazon Linux 2023, which doesn't support grub2 update-bls-cmdline

@bastelfreak bastelfreak added the bug Something isn't working label Aug 20, 2024
@vchepkov vchepkov requested a review from silug August 20, 2024 13:42
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would simplify the whole method to:

def self.mkconfig_cmdline
  os = Facter.value(:os)
  needs_bls_cmdline = os.is_a?(Hash) && os['family'] == 'RedHat' && !['Amazon', 'Fedora'].include?(os['name']) && \
    os['release']['major'].to_i == 9 && os['release']['minor'].to_i >= 3

  cmdline = [mkconfig_path]
  cmdline << '--update-bls-cmdline' if needs_bls_cmdline
  cmdline
end

And then perhaps the Amazon and Fedora exceptions aren't needed since they don't have version 9 that we need to care about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants