Skip to content

Commit

Permalink
Merge pull request #335 from yast/fix_nvram
Browse files Browse the repository at this point in the history
Fix nvram
  • Loading branch information
jreidinger committed May 16, 2016
2 parents ab82908 + e4ee7b1 commit d477eae
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
7 changes: 7 additions & 0 deletions package/yast2-bootloader.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon May 16 11:41:05 UTC 2016 - jreidinger@suse.com

- do not install grub2 with --no-nvram on non-EFI systems
(bnc#980108)
- 3.1.185

-------------------------------------------------------------------
Mon May 16 09:36:28 UTC 2016 - mvidner@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-bootloader.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-bootloader
Version: 3.1.184
Version: 3.1.185
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bootloader/grub_install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def execute(devices: nil, secure_boot: false, trusted_boot: false)
# working NVRAM, we either see no efivars at all (booted via non-EFI entry
# point) or there is no efi variable exposed. Install grub in the
# removable location there.
if Dir.glob("/sys/firmware/efi/efivars/*").empty?
if @efi && Dir.glob("/sys/firmware/efi/efivars/*").empty?
cmd << "--no-nvram" << "--removable"
end

Expand Down
5 changes: 5 additions & 0 deletions test/grub_install_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ def expect_grub2_install(target, device: nil, removable: false)
end

context "initialized with efi:false" do
before do
# no efi vars without efi
stub_efivars(removable: true)
end

subject { Bootloader::GrubInstall.new(efi: false) }

it "raise exception if secure_boot: true passed" do
Expand Down

0 comments on commit d477eae

Please sign in to comment.