summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hscript/meta.cc15
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",