summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-06-13 18:06:33 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-06-13 18:06:33 -0500
commit09f3b58c1d0568ef202231b267bf6324f6751964 (patch)
tree7e299380694cc900b1f37ea088af0340b55db5cf
parentefe16d2b85fd7efc546f840dd380f382f5865622 (diff)
downloadhorizon-09f3b58c1d0568ef202231b267bf6324f6751964.tar.gz
horizon-09f3b58c1d0568ef202231b267bf6324f6751964.tar.bz2
horizon-09f3b58c1d0568ef202231b267bf6324f6751964.tar.xz
horizon-09f3b58c1d0568ef202231b267bf6324f6751964.zip
hscript: bootloader: build in runtime env
-rw-r--r--hscript/meta.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/hscript/meta.cc b/hscript/meta.cc
index 75f4ca1..e42925e 100644
--- a/hscript/meta.cc
+++ b/hscript/meta.cc
@@ -760,8 +760,12 @@ bool Bootloader::execute() const {
} else if(arch == "aarch64") {
method = "grub-efi";
} else if(arch == "x86_64" || arch == "pmmx") {
- if(fs::exists("/sys/firmware/efi")) method = "grub-efi";
- else method = "grub-bios";
+#ifdef HAS_INSTALL_ENV
+ if(fs::exists("/sys/firmware/efi")) {
+ method = "grub-efi";
+ } else
+#endif
+ method = "grub-bios";
} else {
output_error(pos, "bootloader: no default for architecture", arch);
return false;