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

Add new parameter to prevent grub-mkconfig being run #59

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Changes from @raphink
  • Loading branch information
cedws committed Jun 3, 2020
commit 0d111615beb5aaf04de979e0914e768201693b8b
4 changes: 1 addition & 3 deletions lib/puppet/provider/grub_config/grub2.rb
Original file line number Diff line number Diff line change
@@ -102,8 +102,6 @@ def flush

super

if mkconfig
mkconfig "-o", cfg
end
mkconfig "-o", cfg if resource[:run_mkconfig]
end
end
4 changes: 1 addition & 3 deletions lib/puppet/provider/grub_user/grub2.rb
Original file line number Diff line number Diff line change
@@ -284,9 +284,7 @@ def flush
FileUtils.chmod(0755, resource[:target])
end

if mkconfig
mkconfig "-o", grub2_cfg_path
end
mkconfig "-o", grub2_cfg_path if resource[:run_mkconfig]
end

private
2 changes: 1 addition & 1 deletion lib/puppet/type/grub_user.rb
Original file line number Diff line number Diff line change
@@ -78,7 +78,7 @@
end
end

newparam(:mkconfig, :boolean => true) do
newparam(:run_mkconfig, :boolean => true) do
desc "Whether grub(2)-mkconfig should be ran after updating the GRUB configuration"

newvalues(:true, :false)
2 changes: 1 addition & 1 deletion lib/puppet/type/kernel_parameter.rb
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@
defaultto :all
end

newparam(:mkconfig, :boolean => true) do
newparam(:run_mkconfig, :boolean => true) do
desc "Whether grub(2)-mkconfig should be ran after updating the GRUB configuration"

newvalues(:true, :false)