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

Drop stderr from mkconfig output when updating grub #84

Merged
merged 2 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/puppet/provider/grub_config/grub2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ def self.mkconfig_path
end

confine feature: :augeas
commands mkconfig: mkconfig_path

confine exists: mkconfig_path, for_binary: true

def mkconfig
execute(self.class.mkconfig_path, { failonfail: true, combine: false })
end

defaultfor osfamily: :RedHat

Expand Down
7 changes: 6 additions & 1 deletion lib/puppet/provider/grub_menuentry/grub2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,12 @@ def self.prefetch(resources)

#### End Class Methods

commands mkconfig: mkconfig_path
confine exists: mkconfig_path, for_binary: true

def mkconfig
execute(self.class.mkconfig_path, { failonfail: true, combine: false })
end

commands grubby: 'grubby'
commands grub_set_default: 'grub2-set-default'

Expand Down
6 changes: 5 additions & 1 deletion lib/puppet/provider/grub_user/grub2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ def self.mkconfig_path
which('grub2-mkconfig') or which('grub-mkconfig') or '/usr/sbin/grub-mkconfig'
end

commands mkconfig: mkconfig_path
confine exists: mkconfig_path, for_binary: true

def mkconfig
execute(self.class.mkconfig_path, { failonfail: true, combine: false })
end

confine exists: '/etc/grub.d'

Expand Down
7 changes: 6 additions & 1 deletion lib/puppet/provider/kernel_parameter/grub2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ def self.mkconfig_path

confine feature: :augeas
defaultfor augeasprovider_grub_version: 2
commands mkconfig: mkconfig_path

confine exists: mkconfig_path, for_binary: true

def mkconfig
execute(self.class.mkconfig_path, { failonfail: true, combine: false })
end

# when both grub* providers match, prefer GRUB 2
def self.specificity
Expand Down