summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hscript/meta.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/hscript/meta.cc b/hscript/meta.cc
index 0ad4ea5..d79f3f5 100644
--- a/hscript/meta.cc
+++ b/hscript/meta.cc
@@ -806,7 +806,9 @@ bool Bootloader::execute() const {
}
/* remount EFI vars r/w */
- mount(nullptr, "/sys/firmware/efi/efivars", nullptr,
+ const auto efipath{script->targetDirectory() +
+ "/sys/firmware/efi/efivars"};
+ mount(nullptr, efipath.c_str(), nullptr,
MS_REMOUNT | MS_NOEXEC | MS_NODEV | MS_NOSUID | MS_RELATIME,
nullptr);
@@ -817,7 +819,7 @@ bool Bootloader::execute() const {
}
/* done, back to r/o */
- mount(nullptr, "/sys/firmware/efi/efivars", nullptr,
+ mount(nullptr, efipath.c_str(), nullptr,
MS_REMOUNT | MS_RDONLY | MS_NOEXEC | MS_NODEV | MS_NOSUID |
MS_RELATIME, nullptr);
#endif