summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-07-06 12:28:19 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-07-06 12:28:19 -0500
commitb67692de00b2678ffd2d3f1a16f15ee4f440f8e3 (patch)
tree219e6bd93cd5961888f76f9feb01b6124e30d53f
parentf52226ea5635cfe9529e78e553e4f814eeaaaa4d (diff)
downloadhorizon-b67692de00b2678ffd2d3f1a16f15ee4f440f8e3.tar.gz
horizon-b67692de00b2678ffd2d3f1a16f15ee4f440f8e3.tar.bz2
horizon-b67692de00b2678ffd2d3f1a16f15ee4f440f8e3.tar.xz
horizon-b67692de00b2678ffd2d3f1a16f15ee4f440f8e3.zip
hscript: Use target efivarfs path for r/w mount
-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