diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2023-10-21 23:37:12 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2023-10-21 23:37:12 -0500 |
commit | 091f25de6945e70d86b7ef48a6bc036c32dc7a7b (patch) | |
tree | f8af2717d86bed5dd02ac6199efd86cd0024c391 | |
parent | 21ebeeb18569086934c03721d3522b81ebdf859d (diff) | |
download | horizon-091f25de6945e70d86b7ef48a6bc036c32dc7a7b.tar.gz horizon-091f25de6945e70d86b7ef48a6bc036c32dc7a7b.tar.bz2 horizon-091f25de6945e70d86b7ef48a6bc036c32dc7a7b.tar.xz horizon-091f25de6945e70d86b7ef48a6bc036c32dc7a7b.zip |
hscript: bootloader: Stop mucking with efivarfs
The problem was OpenRC which was fixed in packages.git. We should not
have any further issues with efivarfs being read-only outside of host
systems that are running OpenRC >= 0.28 and < 0.39.
-rw-r--r-- | hscript/meta.cc | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/hscript/meta.cc b/hscript/meta.cc index e8bddd8..ee34372 100644 --- a/hscript/meta.cc +++ b/hscript/meta.cc @@ -858,20 +858,7 @@ bool Bootloader::execute() const { /* handle EFI vars partition */ const auto efipath{script->targetDirectory() + "/sys/firmware/efi/efivars"}; - bool efivarfs = false; - if(fs::exists(efipath)) { - /* if it isn't already mounted, that's fine */ - umount(efipath.c_str()); - /* we have to umount all efivarfs ro mounts to make any rw */ - umount("/sys/firmware/efi/efivars"); - if(mount("efivarfs", efipath.c_str(), "efivarfs", MS_NOEXEC | - MS_NODEV | MS_NOSUID | MS_RELATIME, nullptr) != 0) { - output_error(pos, "bootloader: failed to mount efivarfs", - ::strerror(errno)); - } else { - efivarfs = true; - } - } + bool efivarfs = fs::exists(efipath); if(!efivarfs) { output_warning(pos, "bootloader: efivarfs is not available", |